Expand description
The unit table of dimvexa, compiled from audited TOML at build time.
The source of truth is data/units/*.toml (inside this crate): each unit carries an exact rational factor,
an exactness flag (defined or measured), a cited source and a note, and has at least
one golden test vector in data/vectors/. cargo xtask validate-data enforces this.
let reg = dimvexa_data::registry()?;
let c = reg.conversion("psi", "Pa")?;
assert!((c.apply(1.0) - 6894.757_293_168_361).abs() < 1e-9);Constants§
- DATA_
HASH - Hash of the unit tables (FNV-1a 64, detects accidental changes, not cryptographic).
- DATA_
VERSION - Table format and content version, bumped whenever the hash changes.
- PACKS
- Names of the packs compiled in.
Statics§
Functions§
- data_
version - A printable identifier of the table:
v<version>+<hash>. - registry
- Builds a
Registryfrom the compiled seed table.