#[non_exhaustive]pub struct ExactUnit {
pub unit: Option<EntityId>,
pub from_project: bool,
pub dimensions: [i32; 7],
pub scale: f64,
pub offset: f64,
}Expand description
A measure’s effective unit, resolved to SI base units.
value_si = value * scale + offset.
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.unit: Option<EntityId>The unit entity that applies, or None for a dimensionless measure
(IFCCOUNTMEASURE, IFCRATIOMEASURE, …) that takes no unit.
from_project: boolWhether unit is the project default rather than an explicit unit.
dimensions: [i32; 7]SI dimensional exponents [L, M, T, I, Θ, N, J].
scale: f64Multiplier into the SI base unit (kilogram for mass, kelvin for temperature, radian for plane angle).
offset: f64Added after scaling; nonzero only for DEGREE_CELSIUS.
Trait Implementations§
impl Copy for ExactUnit
impl StructuralPartialEq for ExactUnit
Auto Trait Implementations§
impl Freeze for ExactUnit
impl RefUnwindSafe for ExactUnit
impl Send for ExactUnit
impl Sync for ExactUnit
impl Unpin for ExactUnit
impl UnsafeUnpin for ExactUnit
impl UnwindSafe for ExactUnit
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