Expand description
derive_custom_enum_traits
serves as a collection of (currently one) derivable macros for dealing with enums.
Derive Macros§
- Derive
Index - impls a trait for a struct that automatically converts each enum variant into an index and converts an index into an
Option
enum variant. As an example, let’s take a simple enum