2 releases
Uses new Rust 2024
| 0.1.1 | Feb 17, 2026 |
|---|---|
| 0.1.0 | Feb 16, 2026 |
#7 in #enum-variant
599 downloads per month
6KB
64 lines
Enum variant utils
Handy utilities for working with Rust enums.
- VariantDef - automatically define a const struct to make metadata about your enum variants available in a consistent way
- IsVariant - quickly check if something is an instance of a specific variant
- VariantName - quickly get (just) the variant name
- VariantPropsToJsonArray - get the variants properties as a
Vec<serde_json::Value>
More tools and detailed docs to follow soon.
Dependencies
~1.5–2.4MB
~45K SLoC