#[non_exhaustive]pub struct AnnotationDraft<'a> {
pub global_id: &'a str,
pub owner_history: Option<EntityId>,
pub name: Option<&'a str>,
pub description: Option<&'a str>,
pub object_type: Option<&'a str>,
pub object_placement: Option<EntityId>,
pub representation: Option<EntityId>,
pub predefined_type: Option<AnnotationType>,
}Expand description
Draft input for create_annotation: the writable attributes of a new
IfcAnnotation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.global_id: &'a strThe GlobalId (IFC GUID); must parse as a valid base64-like GUID.
owner_history: Option<EntityId>The OwnerHistory reference, when supplied.
name: Option<&'a str>The Name attribute, when supplied.
description: Option<&'a str>The Description attribute, when supplied.
object_type: Option<&'a str>The ObjectType attribute. Required (non-empty) when predefined_type
is AnnotationType::UserDefined.
object_placement: Option<EntityId>The ObjectPlacement reference, when supplied.
representation: Option<EntityId>The Representation reference, when supplied.
predefined_type: Option<AnnotationType>The IFC4X3 PredefinedType, when supplied.
Implementations§
Source§impl<'a> AnnotationDraft<'a>
impl<'a> AnnotationDraft<'a>
Sourcepub fn new(global_id: &'a str) -> Self
pub fn new(global_id: &'a str) -> Self
Starts a draft from its required global_id; every other field is
unset.
Sourcepub fn owner_history(self, value: EntityId) -> Self
pub fn owner_history(self, value: EntityId) -> Self
Sets owner_history.
The OwnerHistory reference, when supplied.
Sourcepub fn description(self, value: &'a str) -> Self
pub fn description(self, value: &'a str) -> Self
Sets description.
The Description attribute, when supplied.
Sourcepub fn object_type(self, value: &'a str) -> Self
pub fn object_type(self, value: &'a str) -> Self
Sets object_type.
The ObjectType attribute. Required (non-empty) when predefined_type
is AnnotationType::UserDefined.
Sourcepub fn object_placement(self, value: EntityId) -> Self
pub fn object_placement(self, value: EntityId) -> Self
Sets object_placement.
The ObjectPlacement reference, when supplied.
Sourcepub fn representation(self, value: EntityId) -> Self
pub fn representation(self, value: EntityId) -> Self
Sets representation.
The Representation reference, when supplied.
Sourcepub fn predefined_type(self, value: AnnotationType) -> Self
pub fn predefined_type(self, value: AnnotationType) -> Self
Sets predefined_type.
The IFC4X3 PredefinedType, when supplied.
Trait Implementations§
Source§impl<'a> Clone for AnnotationDraft<'a>
impl<'a> Clone for AnnotationDraft<'a>
Source§fn clone(&self) -> AnnotationDraft<'a>
fn clone(&self) -> AnnotationDraft<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more