Expand description
This project provides derive implementation for the enumx crate .
See enumx README for more.
Macros§
- Enum
Enum!( Type0, Type1, ..., TypeM )denotes a predefined enum, the definition of which looks like:- def_
impls - defines enums, with the syntax support of
Attribute Macros§
- enumx
- tag an
fnwith#[enumx]to enable “type pattern matching” inmatchexpressions that are tagged with#[ty_pat]/#[ty_pat(gen_variants)]/#[ty_pat(gen A,B,..)]`. - sum
- collects all returned values in exit branches of the function, into an enum type, returning an
impltrait - sum_err
- To translate the
expr?expressions in a different manner than the Rust’s default:
Derive Macros§
- Exchange
- derives
enumx::Exchangetrait for custom definedenums - From
Variant - Derives the trait
enumx::FromVariantfor user defined enum types. - Proto
- Since
enums in Rust do not have prototypes, this macro derives them.