Expand description
A collection of useful macros that make working with enums easier.
Attribute Macros§
- custom_
discriminant - Adds support for custom enum “discriminants” of other types than
isize
. - marker_
type - Adds a new enum that has the same variants as this enum, but holds no data.
Derive Macros§
- Next
Variant - Adds a method for advancing to the next enum variant. Wraps around at the last element.
- Unwrap
Variant - Adds methods for unwrapping variants of the enum.
- Variant
Amount - Adds a constant storing the amount of variants the enum has to the enum.