Crate nameof

source ·
Expand description

Rust name_of! Macro

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

Macros

Takes a binding, type, 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).