Crate enum_traits [] [src]

Simple traits for the builtin enums. The crate enum_traits_macros is required for the derives

Traits

Ends

Derive this trait for an enum using #[derive(EnumEnds)]

FromIndex

Derive this trait for an enum using #[derive(EnumFromIndex)]

Index

Represents the type specified in the repr attribute for the enum item. If a repr attribute does not exist, a calculated minimum integer type based on the number of variant fields is used instead.

Len

Derive this trait for an enum using #[derive(EnumLen)]

ToIndex

Derive this trait for an enum using #[derive(EnumToIndex)]