kvarn_utils

Macro ident_str

source
macro_rules! ident_str {
    ($item:ident $(, $($name:ident)+, $($generics:tt)+)?) => { ... };
}
Expand description

Return stringified representation of $item. This uses similar techniques to ident_str!.

ยงExamples

See fmt_field!.

If you have a generic struct:

use kvarn_utils::ident_str;

struct Foo<T: Eq + Clone> {
    bar: T,
}
assert_eq!(ident_str!(Foo, T, T: Eq + Clone), "Foo");