#[non_exhaustive]pub struct MetricDraft<'a> {
pub base: ConstraintBaseDraft<'a>,
pub benchmark: Benchmark,
pub value_source: Option<&'a str>,
pub data_value: Option<MetricValueDraft<'a>>,
pub reference_path: Option<EntityId>,
}Expand description
Draft for one IfcMetric.
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.base: ConstraintBaseDraft<'a>Inherited constraint fields.
benchmark: BenchmarkComparison benchmark.
value_source: Option<&'a str>Optional source label for the data value.
data_value: Option<MetricValueDraft<'a>>Optional preserved metric SELECT value.
reference_path: Option<EntityId>Optional existing or earlier-staged IfcReference.
Implementations§
Source§impl<'a> MetricDraft<'a>
impl<'a> MetricDraft<'a>
Sourcepub fn new(base: ConstraintBaseDraft<'a>, benchmark: Benchmark) -> Self
pub fn new(base: ConstraintBaseDraft<'a>, benchmark: Benchmark) -> Self
Starts a draft from its required fields; every other field is unset.
Sourcepub fn value_source(self, value: &'a str) -> Self
pub fn value_source(self, value: &'a str) -> Self
Sets value_source: Optional source label for the data value.
Sourcepub fn data_value(self, value: MetricValueDraft<'a>) -> Self
pub fn data_value(self, value: MetricValueDraft<'a>) -> Self
Sets data_value: Optional preserved metric SELECT value.
Sourcepub fn reference_path(self, value: EntityId) -> Self
pub fn reference_path(self, value: EntityId) -> Self
Sets reference_path: Optional existing or earlier-staged
IfcReference.
Trait Implementations§
Source§impl<'a> Clone for MetricDraft<'a>
impl<'a> Clone for MetricDraft<'a>
Source§fn clone(&self) -> MetricDraft<'a>
fn clone(&self) -> MetricDraft<'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 MetricDraft<'a>
Auto Trait Implementations§
impl<'a> Freeze for MetricDraft<'a>
impl<'a> RefUnwindSafe for MetricDraft<'a>
impl<'a> Send for MetricDraft<'a>
impl<'a> Sync for MetricDraft<'a>
impl<'a> Unpin for MetricDraft<'a>
impl<'a> UnsafeUnpin for MetricDraft<'a>
impl<'a> UnwindSafe for MetricDraft<'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