Skip to main content

keypath

Macro keypath 

Source
macro_rules! keypath {
    ($type:path : [$index:expr] $($tail:tt)* ) => { ... };
    ($type:path : $($tail:tt)* ) => { ... };
    ($path:ident . $field:ident $($tail:tt)*) => { ... };
    ($path:ident . $field:tt $($tail:tt)*) => { ... };
    ($path:ident [$index:expr] $($tail:tt)*) => { ... };
    ($path:ident $field:ident $($tail:tt)*) => { ... };
    ($path:ident) => { ... };
}