[][src]Macro neli::impl_var_trait

macro_rules! impl_var_trait {
    ( $( #[$outer:meta] )* $name:ident, $ty:ty, $impl_name:ident, $var_def:ident => $val_def:expr,
      $( $var:ident => $val:expr ),* ) => { ... };
    ( $name:ident, $ty:ty, $impl_name:ident, $var_def:ident => $val_def:expr,
      $( $var:ident => $val:expr ),* ) => { ... };
}

For defining a new enum implementing the provided marker trait. It accepts a name for the enum and the target type for serialization and deserialization conversions, as well as value conversions for serialization and deserialization.