slang_
derive
0.1.0
All Items
Crate Items
Functions
Derive Macros
Crate
slang_derive
Copy item path
Source
Functions
§
extract_
name_
attribute
🔒
Extract the string value from a
#[name = "..."]
attribute if present
Derive Macros
§
Iterable
Enum
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.
Named
Enum
Derive macro that generates
name()
and
from_str()
methods for enums based on
#[type_name = "..."]
attributes on the variants.
Numeric
Enum
Derive macro that generates bidirectional conversion methods between enum variants and their numeric values. This automatically generates: