Expand description
Interact with an enum type via traits.
Traits§
- HasVariant
- Signifies this type functions like an enum with variant
T
. This means you can createSelf
fromT
, and given aSelf
you can try to convert it into aT
.
Derive Macros§
- HasVariant
- Dervies
HasVariant
for an enum. Note: it ignores variants with multiple or no contents. Currently does not support generics nor lifetimes.