2 unstable releases
0.2.0 | Feb 16, 2022 |
---|---|
0.1.0 | Feb 13, 2022 |
#16 in #deriving
Used in derive_custom_enum_traits
3KB
custom_enum_traits
This is designed to become a set of traits designed to make it easier to work with enums.
Currently, there is just one trait, though this may change. Ultimately, all
of these traits are likely to be designed so they are derive-able. The
library for deriving these traits is derive_custom_enum_traits
.
lib.rs
:
A small library devoted to adding custom information, like indexing, to enums.
Note that these traits are useless when they are not accompanied by
the derive_custom_enum_traits
library, which automatically derives these traits.
The utilities should be fairly straightforward ones, such as a custom trait that indexes an enum's placement. I'm using this in a library so I can hold information in an array, where each item in the array refers to a different item in an enum.