pub struct ResolvedUnit {
pub unit: Option<u64>,
pub from_project: bool,
pub dimensions: [i32; 7],
pub scale: f64,
pub offset: f64,
}Expand description
A measure’s effective unit, resolved to SI: si = value * scale + offset.
Fields§
§unit: Option<u64>The unit entity that applies; None for a dimensionless measure.
from_project: boolWhether unit is the project default rather than the stated one.
dimensions: [i32; 7]SI dimensional exponents [L, M, T, I, Θ, N, J].
scale: f64Multiplier into the SI base unit.
offset: f64Added after scaling; nonzero only for degrees Celsius.
Trait Implementations§
Source§impl Clone for ResolvedUnit
impl Clone for ResolvedUnit
Source§fn clone(&self) -> ResolvedUnit
fn clone(&self) -> ResolvedUnit
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResolvedUnit
impl Debug for ResolvedUnit
Source§impl PartialEq for ResolvedUnit
impl PartialEq for ResolvedUnit
impl StructuralPartialEq for ResolvedUnit
Auto Trait Implementations§
impl Freeze for ResolvedUnit
impl RefUnwindSafe for ResolvedUnit
impl Send for ResolvedUnit
impl Sync for ResolvedUnit
impl Unpin for ResolvedUnit
impl UnsafeUnpin for ResolvedUnit
impl UnwindSafe for ResolvedUnit
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