摘要: 使用type_name 通过使用std::any::type_name获得. 编写函数 fn print_type_of<T>(_: &T) { println!("The type is: {}", type_name::<T>()); } Example use std::any::type_n 阅读全文
posted @ 2024-10-10 16:59 winddevil 阅读(255) 评论(0) 推荐(0)