Expand description
Lightweight declarative macro for sets of strings.
strum_lite::strum! {
pub enum Casing {
Kebab = "kebab-case",
ScreamingSnake = "SCREAMING_SNAKE",
}
}§Features
- Implements
FromStrandDisplay. - Attributes (docs,
#[derive(..)]s) are passed through to the definition and variants. - Aliases are supported.
- Custom enum discriminants are passed through.
#![no_std].- The generated
FromStr::Errprovides a helpful error message. - You may ask for a
constslice of all the variants. - You may ask for a custom zero-sized error type rather than using this crate’s
ParseError.
Macros§
Structs§
- Parse
Error - Pointer-wide shared error type for
strum!.