use std::any::type_name; pub trait TypeName { /// Returns the name of this type. fn type_name(&self) -> &'static str; } impl TypeName for Vec { fn type_name(&self) -> &'static str { type_name::() } }