Macro build_enum

Source
macro_rules! build_enum {
    (@accum (1, $name:ident { $([$($doc:expr,)*] $key:ident = $value:expr),* })) => { ... };
    ($name:ident {
      $($key:ident = $value:expr),*
  }) => { ... };
}
Expand description

Generates a public enum with the following traits implemented:

  • From<T> for u8
  • TryFrom<u8> for T