macro_rules! numerical_enum {
(
$(#[$attr:meta])*
$vis:vis enum $enum_name:ident as $repr:tt {
$(
$(#[$id_attr:meta])*
$identifier:ident = $value:expr,
)+
}
) => { ... };
}
Expand description
Implements TryFrom
for enums from their numerical representation.