3 releases
| 0.1.2 | Aug 4, 2023 |
|---|---|
| 0.1.1 | Aug 4, 2023 |
| 0.1.0 | Aug 3, 2023 |
#35 in #convenience
Used in structinator_traits
7KB
Enum Unwrapper
enum_unwrapper is a lightweight procedural macro for "unwrapping" enums into their inner types when the variant is known through automatic implementation of TryFrom.
enum_unrapper does this by allowing the user to add a procedural macro attribute, [macro@unique_try_froms] to enum definitions.
For more information and examples, check the attribute's documentation.
This is a library designed to ease the process of "unwrapping" enums to access the data within. After attaching the attribute #[unique_try_froms] to an enum definition, checked conversion through try_from is possible to any unique value type in the enum. For more information, check this library's documentation below.
Dependencies
~135–520KB
~12K SLoC