use-units
Foundational unit descriptors and linear conversion helpers.
use-units provides a compact UnitSpec type for describing compatible units and applying simple
linear conversions. It is intended to act as the shared vocabulary layer for future RustUse
chemistry, physics, wave, time, finance, and measurement crates.
What this crate provides
| Item | Purpose |
|---|---|
UnitDomain |
Domain tags for cross-workspace unit families |
SUPPORTED_DOMAINS |
Stable list of the current RustUse unit domains |
UnitSpec |
Small copyable unit descriptor with a scale to a base |
convert_value() |
Compatibility-checked linear conversion helper |
Installation
[]
= "0.1.0"
Example
use ;
let second = new;
let minute = new;
assert_eq!;
assert!;
Scope
- Small, auditable metadata types.
- Linear scaling only.
- No global registry or domain-specific catalogs yet.