A simple derive macro to generate an ordinal()
method for enums.
Unlike num_derive::ToPrimitive
, this derive macro
allows non-C-like enums. The ordinal
function reflects
the variant of the enum and does not account
for fields.
Example
use Ordinal;
assert_eq!;
assert_eq!;