field

Macro field 

Source
macro_rules! field {
    ($field:ident) => { ... };
    ($ty:ident :: $field:ident) => { ... };
    ($ty:ident :: $nested:ident :: $field:ident) => { ... };
    ($ty:ident :: $nested1:ident :: $nested2:ident :: $field:ident) => { ... };
    ($ty:ident :: $nested1:ident :: $nested2:ident :: $nested3:ident :: $field:ident) => { ... };
}
Expand description

Macro for creating type-safe field paths.

ยงExamples

use derive_wizard::field;
// Single field (top-level)
field!(name); // expands to FieldPath from "name"

// Nested field
field!(Person::contact::email); // expands to FieldPath from "contact.email"

// Multiple levels
field!(Company::address::location::city); // expands to FieldPath from "address.location.city"