#[non_exhaustive]pub struct ConstraintBaseDraft<'a> {
pub name: &'a str,
pub description: Option<&'a str>,
pub grade: ConstraintGrade,
pub source: Option<&'a str>,
pub creating_actor: Option<EntityId>,
pub creation_time: Option<DateTimeInput<'a>>,
pub user_defined_grade: Option<&'a str>,
}Expand description
Common inherited IfcConstraint fields.
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.name: &'a strRequired constraint name.
description: Option<&'a str>Optional description.
grade: ConstraintGradeTyped constraint grade.
source: Option<&'a str>Optional source label.
creating_actor: Option<EntityId>Optional existing or earlier-staged actor-select target.
creation_time: Option<DateTimeInput<'a>>Optional creation time: IFC4/IFC4X3 IfcDateTime text, or an
existing or earlier-staged IFC2X3 IfcDateTimeSelect record.
user_defined_grade: Option<&'a str>Required when grade is user-defined.
Implementations§
Source§impl<'a> ConstraintBaseDraft<'a>
impl<'a> ConstraintBaseDraft<'a>
Sourcepub fn new(name: &'a str, grade: ConstraintGrade) -> Self
pub fn new(name: &'a str, grade: ConstraintGrade) -> Self
Starts a draft from its required fields; every other field is unset.
Sourcepub fn description(self, value: &'a str) -> Self
pub fn description(self, value: &'a str) -> Self
Sets description: Optional description.
Sourcepub fn creating_actor(self, value: EntityId) -> Self
pub fn creating_actor(self, value: EntityId) -> Self
Sets creating_actor: Optional existing or earlier-staged actor-select
target.
Sourcepub fn creation_time(self, value: impl Into<DateTimeInput<'a>>) -> Self
pub fn creation_time(self, value: impl Into<DateTimeInput<'a>>) -> Self
Sets creation_time: text, or an IFC2X3 date record.
Sourcepub fn user_defined_grade(self, value: &'a str) -> Self
pub fn user_defined_grade(self, value: &'a str) -> Self
Sets user_defined_grade: Required when grade is user-defined.
Trait Implementations§
Source§impl<'a> Clone for ConstraintBaseDraft<'a>
impl<'a> Clone for ConstraintBaseDraft<'a>
Source§fn clone(&self) -> ConstraintBaseDraft<'a>
fn clone(&self) -> ConstraintBaseDraft<'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 ConstraintBaseDraft<'a>
Auto Trait Implementations§
impl<'a> Freeze for ConstraintBaseDraft<'a>
impl<'a> RefUnwindSafe for ConstraintBaseDraft<'a>
impl<'a> Send for ConstraintBaseDraft<'a>
impl<'a> Sync for ConstraintBaseDraft<'a>
impl<'a> Unpin for ConstraintBaseDraft<'a>
impl<'a> UnsafeUnpin for ConstraintBaseDraft<'a>
impl<'a> UnwindSafe for ConstraintBaseDraft<'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