pub struct Registry {Show 13 fields
pub base_units: BTreeSet<BaseUnit>,
pub base_unit_long_names: BTreeMap<String, String>,
pub units: BTreeMap<String, Number>,
pub quantities: BTreeMap<Dimensionality, String>,
pub decomposition_units: BTreeMap<Dimensionality, String>,
pub prefixes: Vec<(String, Numeric)>,
pub definitions: BTreeMap<String, Expr>,
pub docs: BTreeMap<String, String>,
pub categories: BTreeMap<String, String>,
pub category_names: BTreeMap<String, String>,
pub datepatterns: Vec<Vec<DatePattern>>,
pub substances: BTreeMap<String, Substance>,
pub substance_symbols: BTreeMap<String, String>,
}
Fields§
§base_units: BTreeSet<BaseUnit>
Contains the base units, e.g. kg
, bit
.
base_unit_long_names: BTreeMap<String, String>
Mappings from short forms of base units to long forms, e.g. kg
→ kilogram
.
units: BTreeMap<String, Number>
Contains numerical values of units.
quantities: BTreeMap<Dimensionality, String>
Maps dimensionality to named physical quantities like energy
.
decomposition_units: BTreeMap<Dimensionality, String>
Maps dimensionality to names of SI derived units (newton, pascal, etc.) for showing simplified forms of units.
prefixes: Vec<(String, Numeric)>
A list of prefixes that can be applied to units, like kilo
.
definitions: BTreeMap<String, Expr>
Contains the original expressions defining a unit.
docs: BTreeMap<String, String>
Contains documentation strings.
categories: BTreeMap<String, String>
Maps unit names to category IDs.
category_names: BTreeMap<String, String>
Maps category IDs to display names.
datepatterns: Vec<Vec<DatePattern>>
Used for matching date formats.
substances: BTreeMap<String, Substance>
Objects or materials that have certain properties.
substance_symbols: BTreeMap<String, String>
Maps elemental names (like He
) to substance names (helium
),
used for parsing molecular formulas, e.g. H2O
.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Registry
impl RefUnwindSafe for Registry
impl Send for Registry
impl Sync for Registry
impl Unpin for Registry
impl UnwindSafe for Registry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more