Macro nameof::name_of_type
[−]
[src]
macro_rules! name_of_type { ($t: ty) => { ... }; }
Alternative for the name_of!(type T)
macro specifically for types.
Examples
#[macro_use] extern crate nameof; // Alternative for Types struct TestStruct { test_field: i32 } println!("Struct is called `{}`.", name_of_type!(TestStruct)); println!("Struct is called `{}`.", name_of_type!(i32));