#[non_exhaustive]pub struct QuantityDraft<'a> {
pub kind: QuantityKind,
pub name: &'a str,
pub description: Option<&'a str>,
pub unit: Option<EntityId>,
pub value: f64,
pub formula: Option<&'a str>,
}Expand description
Authored fields for a simple physical quantity.
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.kind: QuantityKindThe dimension being measured.
name: &'a strIfcPhysicalQuantity.Name. Required: an unnamed quantity cannot be
matched to the rate it is meant to multiply.
description: Option<&'a str>IfcPhysicalQuantity.Description, if given.
unit: Option<EntityId>IfcPhysicalSimpleQuantity.Unit, an IfcNamedUnit reference, if
given. Absent means the project unit for the dimension applies.
value: f64The measured amount.
formula: Option<&'a str>Formula, the derivation note, if given.
Implementations§
Source§impl<'a> QuantityDraft<'a>
impl<'a> QuantityDraft<'a>
Sourcepub const fn new(kind: QuantityKind, name: &'a str, value: f64) -> Self
pub const fn new(kind: QuantityKind, name: &'a str, value: f64) -> Self
Starts a draft for a quantity of kind named name measuring
value, with every optional attribute unset.
Sourcepub fn description(self, value: &'a str) -> Self
pub fn description(self, value: &'a str) -> Self
Sets IfcPhysicalQuantity.Description.
Trait Implementations§
Source§impl<'a> Clone for QuantityDraft<'a>
impl<'a> Clone for QuantityDraft<'a>
Source§fn clone(&self) -> QuantityDraft<'a>
fn clone(&self) -> QuantityDraft<'a>
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 moreimpl<'a> Copy for QuantityDraft<'a>
Auto Trait Implementations§
impl<'a> Freeze for QuantityDraft<'a>
impl<'a> RefUnwindSafe for QuantityDraft<'a>
impl<'a> Send for QuantityDraft<'a>
impl<'a> Sync for QuantityDraft<'a>
impl<'a> Unpin for QuantityDraft<'a>
impl<'a> UnsafeUnpin for QuantityDraft<'a>
impl<'a> UnwindSafe for QuantityDraft<'a>
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