enum-tree
Derive macros for working with enum variants:
DeepVariants-- generates a compile-time array containing every reachable variant value, recursively descending into singleton tuple variants whose inner type also derivesDeepVariants.EnumFrom-- generatesFromimpls for the enum from fields tagged#[enum_from], with optional conversion viavia = ...and per-field defaults viadefault = ....IntoAncestors-- generatesFromimpls that build an ancestor enum from a descendant by chaining through intermediate enums.
use DeepVariants;
assert_eq!;
Renaming the crate
Pass #[enum_tree(crate = path)] when the runtime crate has been
re-exported under a different name.