1 unstable release
0.1.0 | Mar 3, 2022 |
---|
#27 in #usize
5KB
derive_custom_enum_traits
This is a set of (currently one) derive macros for Rust for dealing with enums. Its current macro, DeriveIndex
creates two functions for an enum, to_index
, which converts an enum variant into its 0-indexed order; and
from_index
which converts a usize
into an Option<Variant>
.
lib.rs
:
derive_custom_enum_traits
serves as a collection of (currently one) derivable macros for dealing with enums.
Dependencies
~1.5MB
~37K SLoC