Skip to main content

keypath

Macro keypath 

Source
macro_rules! keypath {
    { $root:ident . $field:ident } => { ... };
    { $root:ident . $field:ident . $($ty:ident . $f:ident).+ } => { ... };
    ($root:ident . $field:ident) => { ... };
    ($root:ident . $field:ident . $($ty:ident . $f:ident).+) => { ... };
}
Expand description

Build a keypath from Type.field segments. Use with types that have keypath accessors (e.g. #[derive(Kp)] from key-paths-derive).