Expand description

Rust name_of! Macro

MIT License Copyright (c) 2018 SilentByte https://silentbyte.com/


Takes a binding, type, const, or function as an argument and returns its unqualified string representation. If the identifier does not exist in the current context, the macro will cause a compilation error. This macro is mainly intended for debugging purposes and to improve the refactoring experience compared to plain stringify!().

Takes the name of a type as its sole parameter, e.g. name_of_type!(SomeStruct) or name_of_type!(f64).

Takes the path of a type/mod/const.. as its path &str, e.g. path_of!(web::info::Foo).