We have an intrinsic which returns a &'static str naming a type but it's not exposed in a safe/stable manner anywhere: http://doc.rust-lang.org/std/intrinsics/fn.type_name.html
Something like this should suffice:
pub fn type_name<T: Reflect + ?Sized>() -> &'static str {
unsafe { std::intrinsics::type_name::<T>() }
}
We have an intrinsic which returns a
&'static strnaming a type but it's not exposed in a safe/stable manner anywhere: http://doc.rust-lang.org/std/intrinsics/fn.type_name.htmlSomething like this should suffice: