rusticata_macros

Macro newtype_enum

Source
macro_rules! newtype_enum {
    (@collect_impl, $name:ident, $($key:ident = $val:expr),* $(,)*) => { ... };
    (@collect_disp, $name:ident, $f:ident, $m:expr, $($key:ident = $val:expr),* $(,)*) => { ... };
    (impl $name:ident {$($body:tt)*}) => { ... };
    (impl display $name:ident {$($body:tt)*}) => { ... };
    (impl debug $name:ident {$($body:tt)*}) => { ... };
}
Expand description

Helper macro for newtypes: declare associated constants and implement Display trait