Expand description
This crate provides a procedural derive macro for constant From trait implementations for
enumerations based on their repr type.
Due to offering const support, this library requires the usage of Rust nightly. Additionally, you must add the following feature flags to your crate root:
#![feature(const_trait_impl)] // always requiredThis is required as some features are currently gated behind these flags. Further documentation about usage can be found in the individual macro.
Derive Macrosยง
- Const
Enum - This function defines the procedural derive macro
ConstEnum. It can be used on any enum with areprtype, e.g.repr(u8).