stringify_field

Macro stringify_field 

Source
macro_rules! stringify_field {
    ($(::$field:tt)*) => { ... };
}
Expand description

Stringify a field path into its canonical string form.

This macro is used within the field! macro for supporting auto-completion of nested fields while still being able to generate “stringify” field paths from raw tokens!

§Example

use field_path::field::stringify_field;

let stringify = stringify_field!(::translation::x);
assert_eq!(stringify, "::translation::x");