Crate slang_derive

Source

Functions§

extract_name_attribute 🔒
Extract the string value from a #[name = "..."] attribute if present

Derive Macros§

IterableEnum
Derive macro that generates an iterator over all enum variants. This creates a method iter() that returns an iterator over all possible values of the enum.
NamedEnum
Derive macro that generates name() and from_str() methods for enums based on #[type_name = "..."] attributes on the variants.
NumericEnum
Derive macro that generates bidirectional conversion methods between enum variants and their numeric values. This automatically generates: