macro_rules! function_name_plus { ($plus:literal) => { ... }; }
Expand description
Return the current function name plus preceding namespaces as a
&'static str
.
For example,
function_name_plus!(1)
returns"my_struct::my_func"
function_name_plus!(2)
returns"my_mod::my_struct::my_func"
function_name_plus!(0)
is equivalent to function_name!()
.
function_name_plus
must be a macro (and not a function) to reliably use
std::any::type_name::<T>()
introspection.