| Crates.io | strum-lite |
| lib.rs | strum-lite |
| version | 0.1.1 |
| created_at | 2025-03-29 17:48:59.48714+00 |
| updated_at | 2025-03-29 18:08:52.058435+00 |
| description | Lightweight declarative macro for sets of strings. |
| homepage | https://crates.io/crates/strum-lite |
| repository | https://github.com/aatifsyed/strum-lite |
| max_upload_size | |
| id | 1611482 |
| size | 12,097 |
Lightweight declarative macro for sets of strings.
strum_lite::strum! {
pub enum Casing {
Kebab = "kebab-case",
ScreamingSnake = "SCREAMING_SNAKE",
}
}
FromStr and Display.#[derive(..)]s) are passed through to the definition and variants.#![no_std].FromStr::Err provides a helpful error message.ParseError].strum_lite::with_error! {
#[derive(Default)]
#[repr(u8)]
pub enum Casing {
Kebab = "kebab-case" | "kebab" = 1,
#[default]
ScreamingSnake = "SCREAMING_SNAKE" = 1 + 2,
}
throws
#[derive(Clone, Copy)]
ParseCasingError;
}