Macro enum_ordinalize::create_ordinalized_enum [−][src]
macro_rules! create_ordinalized_enum { ( $name:ident $( ,$variants:ident )+ $(,)* ) => { ... }; ( $name:ident $( ,$variants:ident = $values:expr )+ $(,)* ) => { ... }; ( pub $name:ident $( ,$variants:ident )+ $(,)* ) => { ... }; ( pub $name:ident $( ,$variants:ident = $values:expr )+ $(,)* ) => { ... }; }
Create an enum and implement a ordinal
method, as well as from_ordinal
and from_ordinal_unsafe
associated functions for it. The new enum also implements Debug
, PartialEq
, and Clone
traits.