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 custom error type rather than using this crate's [
ParseError].
with_error!