Crate qty_macros

source ·
Expand description

Macros supporting crate quantities.

For more information see crate quantities or its repository quantities.rs.

Attribute Macros§

  • Generates an enum with the given units (incl. the refunit, if given) as variants, an implemention of trait Unit for this enum and a type alias of Qty with the enum as parameter and named after the given struct.

Derive Macros§

  • Derives a function iter that returns an iterator over the variants of a fieldless enum.
  • Derives a constant for each variant of a fieldless enum.