[−][src]Macro nameof::name_of_type
Takes the name of a type as its sole parameter,
e.g. name_of_type!(SomeStruct)
or name_of_type!(f64)
.
It is an alternative to the name_of!(type T)
macro, specifically for types.
Examples
struct TestStruct { test_field: i32 } println!("Struct is called `{}`.", name_of_type!(TestStruct)); println!("Type is called `{}`.", name_of_type!(i32));