light_enum
A crate providing a derive keyword to generate a light enum.
Usage
cargo add light_enum
Add #[derive(LightEnum)] on top of your enum.
Example
use LightEnum;
MyEnumLight will be generated:
Note
Having a field without content in your enum will not compile. The macro doesn't support it.
// this code will not compile
Dev
The cargo expand utility is useful to see what is generated.
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.