pub struct ComputedQuantity {
pub kind: QuantityKind,
pub value: f64,
pub unit: String,
}Expand description
A value computed outside this crate, with its meaning attached.
Constructing one requires stating the kind and unit, so a bare f64
cannot cross the boundary – the crate invariant that units stay explicit.
Fields§
§kind: QuantityKindWhat was measured.
value: f64The magnitude.
unit: StringThe IfcUnitEnum-style unit name the value is expressed in, e.g.
METRE with no prefix. Compared textually against the authored unit.
Trait Implementations§
Source§impl Clone for ComputedQuantity
impl Clone for ComputedQuantity
Source§impl Debug for ComputedQuantity
impl Debug for ComputedQuantity
Source§impl PartialEq for ComputedQuantity
impl PartialEq for ComputedQuantity
impl StructuralPartialEq for ComputedQuantity
Auto Trait Implementations§
impl Freeze for ComputedQuantity
impl RefUnwindSafe for ComputedQuantity
impl Send for ComputedQuantity
impl Sync for ComputedQuantity
impl Unpin for ComputedQuantity
impl UnsafeUnpin for ComputedQuantity
impl UnwindSafe for ComputedQuantity
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