#[non_exhaustive]pub struct Analysis {
pub dimension: Dimension,
pub factor: f64,
pub offset: f64,
pub is_dimensionless: bool,
pub is_special: bool,
}Expand description
The result of analyzing a unit expression: its dimension and the linear (and affine) relationship of its magnitude to the canonical UCUM base units.
For an ordinary unit, a magnitude v in this unit equals factor · v in
base units. For an affine unit (e.g. Cel), it equals factor · v + offset.
For a logarithmic or arbitrary special unit, is_special is true and the
linear fields are informational only; see Ucum::convert for the
conversion rules.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.dimension: DimensionThe dimensional exponent vector.
factor: f64Multiplicative factor to canonical base units.
offset: f64Affine offset to canonical base units (0.0 for multiplicative units).
is_dimensionless: boolWhether the unit is dimensionless.
is_special: boolWhether the unit is a special (non-multiplicative) UCUM unit.
Trait Implementations§
impl Copy for Analysis
impl StructuralPartialEq for Analysis
Auto Trait Implementations§
impl Freeze for Analysis
impl RefUnwindSafe for Analysis
impl Send for Analysis
impl Sync for Analysis
impl Unpin for Analysis
impl UnsafeUnpin for Analysis
impl UnwindSafe for Analysis
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