[][src]Macro numeric_enum_macro::numeric_enum

macro_rules! numeric_enum {
    (#[repr($repr:ident)]
     $(#$attrs:tt)* $vis:vis enum $name:ident {
        $($enum:ident = $constant:expr),* $(,)?
    } ) => { ... };
}

Declares an enum with a given numeric representation defined by literals.

Only explicetly enumerated enum constants are supported.

Automatically derives TryFrom<$repr> and From<$name>.

For examples look at the crate root documentation.