Lightweight declarative macro for sets of strings.
strum!
Features
- Implements
FromStrandDisplay. - Attributes (docs,
#[derive(..)]s) are passed through to the definition and variants. - Aliases are supported.
- Custom enum discriminants are passed through.
- Generated code is
#![no_std]. - The generated
FromStr::Errprovides a helpful error message. - You may ask for a
constof all the variants. - You may ask for a custom zero-sized error type rather than using this crate's [
ParseError].
strum!
assert_eq!;
assert_eq!;