Crate enum_macros

Source
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§

NextVariant
Adds a method for advancing to the next enum variant. Wraps around at the last element.
UnwrapVariant
Adds methods for unwrapping variants of the enum.
VariantAmount
Adds a constant storing the amount of variants the enum has to the enum.