Crate enumeration
source ·Expand description
Provides extension to rust enum
This crate provides Enumeration
trait for rust enum
with the following features
- implementation for common traits (Clone, Copy, Hash, etc.)
- getting number of variants through constant
Enumeration::VARIANT_COUNT
- casting between index (of type
Enumeration::Index
) and enumeration - attaching a constant value to each of the variants
- runtime representation of enumeration
Modules
- Convenience re-export of common members
Macros
- This macro helps to create enum with trait Enumeration.
Structs
- Error type when attempting to cast Variant to Enumeration
- Error type when casting from Enumeration::Index to Enumeration.
- Provides runtime specialized representation of Enumeration.
- Provides runtime specialized representation of Enumeration with specified Enumeration::AssociatedValueType. More details in Variant.
Traits
- A trait to extend enum.