Expand description
Macros supporting crate quantities.
For more information see crate quantities or its repository quantities.rs.
Attribute Macros§
- quantity
- Generates an enum with the given units (incl. the refunit, if given) as
variants, an implemention of trait
Unitfor this enum and a type alias ofQtywith the enum as parameter and named after the given struct.
Derive Macros§
- Enum
Iter - Derives a function
iterthat returns an iterator over the variants of a fieldless enum. - Variants
AsConstants - Derives a constant for each variant of a fieldless enum.