Skip to main content

Crate vle_units

Crate vle_units 

Source
Expand description

VLE Units of Measurement

Two layers:

  1. Compile-time typed quantities — use uom::si::f64::* directly (e.g. ThermodynamicTemperature, Pressure, MolarEnergy, TemperatureInterval). uom enforces dimensional safety at compile time at zero runtime cost; we no longer wrap its types in Vle* aliases.

  2. Runtime registry API (registry, parser, toml_loader) — used at the FFI boundary to parse user-supplied unit strings like "3.5 barg" or "25 degC". Extensible at runtime: define new units or whole derived dimensions without recompiling.

See [docs/en/units/dimensional-analysis.md] for the full design rationale.

Re-exports§

pub use registry::Dimension;
pub use registry::DimensionVector;
pub use registry::RegistryError;
pub use registry::UnitDef;
pub use registry::UnitRegistry;

Modules§

parser
Parser for "<value> <unit>" strings.
registry
Runtime extensible unit registry.
toml_loader
TOML loader for bulk user-defined units.

Constants§

P_ATM_STANDARD_KPA
Standard atmospheric pressure in kPa (1 standard atm).

Functions§

default_units_toml
The raw TOML text used by UnitRegistry::with_vle_defaults.