Skip to main content

ReprEnum

Derive Macro ReprEnum 

Source
#[derive(ReprEnum)]
{
    // Attributes available to this derive:
    #[repr_enum]
}
Expand description

Zero-dependency derive for unit-only #[repr(u8|u16|u32|u64|i8|i16|i32|i64)] enums emitting COUNT, ALL, as_<repr>, try_from_<repr>, and (only with #[repr_enum(fallback = V)]) from_<repr>.