Crate enum_utils

Source
Expand description

A set of procedural macros for deriving useful functionality on enums.

Derive Macrosยง

FromStr
Derives FromStr for C-like enums.
IterVariants
Derives a static method, iter(), which iterates over the variants of an enum.
ReprFrom
Derives From<CLikeEnum> for the primitive representation specified in #[repr(...)].
TryFromRepr
Derives TryFrom<Repr> for a C-like enum, where Repr is a primitive representation specified in #[repr(...)].