Expand description
Zero-hassle marker unit library. Correct code made easy.
Example
use new_units::*;
struct Inches;
assert_eq!(
3.of(Inches) * 10.of(Inches),
30.of(Inches) * 1,
"The answer isn't `30 Inches²` because this crate is not for units of measure.",
);
assert_eq!(3.of(Inches), 3);
Structs
- Add a marker to another type, eg
Unit<Point3, LastPosition>
.
Traits
- Utility trait for constructing
Unit
s.
Type Definitions
IndexTo<Cars>
indexesVec<_, Cars>
.