Module quantities::prelude
source · Expand description
This module reexports all macros and types needed to define a quantity.
Re-exports
pub use crate::AmountT;pub use crate::HasRefUnit;pub use crate::LinearScaledUnit;pub use crate::Quantity;pub use crate::Rate;pub use crate::SIPrefix;pub use crate::Unit;pub use crate::ONE;
Macros
- Converts a numeric literal to an
AmountT.
Attribute Macros
- 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.