#[non_exhaustive]pub struct TypeDraft<'a> {Show 14 fields
pub name: Option<&'a str>,
pub description: Option<&'a str>,
pub applicable_occurrence: Option<&'a str>,
pub maps_or_identification: Option<Slot6<'a>>,
pub tag_or_long_description: Option<&'a str>,
pub fallback: Option<&'a str>,
pub operation_type: Option<&'a str>,
pub user_defined_operation_type: Option<&'a str>,
pub partitioning_type: Option<&'a str>,
pub user_defined_partitioning_type: Option<&'a str>,
pub parameter_takes_precedence: Option<bool>,
pub event_trigger_type: Option<&'a str>,
pub user_defined_event_trigger_type: Option<&'a str>,
pub assembly_place: Option<&'a str>,
}Expand description
Attributes of a type definition: those every type shares, and the few one type requires on top.
tag_or_long_description and maps_or_identification occupy slots
7 and 6, whose meaning depends on Family. Naming them for both
readings keeps a caller from assuming the element-type reading on a
resource type, where it would file a tag as a description.
The type-specific fields (#214) carry the attributes IFC4 and IFC4X3
require on four types, as references/ifc-spec declares them:
IfcDoorType OperationType : IfcDoorTypeOperationEnum;
IfcWindowType PartitioningType : IfcWindowTypePartitioningEnum;
IfcEventType EventTriggerType : IfcEventTriggerTypeEnum;
IfcFurnitureType AssemblyPlace : IfcAssemblyPlaceEnum; (IFC2X3 too)A value for an attribute the type does not declare in the bound release is refused, never dropped.
The struct is #[non_exhaustive]: build it with TypeDraft::new and
the setters, so a field a later release needs can be added without
breaking callers.
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.name: Option<&'a str>Name.
description: Option<&'a str>Description.
applicable_occurrence: Option<&'a str>ApplicableOccurrence, slot 4.
maps_or_identification: Option<Slot6<'a>>Slot 6: RepresentationMaps refs, or Identification text.
tag_or_long_description: Option<&'a str>Slot 7: Tag on element types, LongDescription otherwise.
fallback: Option<&'a str>Slot 8: the USERDEFINED fallback. Required when the
predefined type is USERDEFINED.
operation_type: Option<&'a str>IfcDoorType.OperationType, an IfcDoorTypeOperationEnum token;
required on IfcDoorType.
user_defined_operation_type: Option<&'a str>IfcDoorType.UserDefinedOperationType.
partitioning_type: Option<&'a str>IfcWindowType.PartitioningType, an IfcWindowTypePartitioningEnum
token; required on IfcWindowType.
user_defined_partitioning_type: Option<&'a str>IfcWindowType.UserDefinedPartitioningType.
parameter_takes_precedence: Option<bool>ParameterTakesPrecedence on IfcDoorType and IfcWindowType.
event_trigger_type: Option<&'a str>IfcEventType.EventTriggerType, an IfcEventTriggerTypeEnum token;
required on IfcEventType.
user_defined_event_trigger_type: Option<&'a str>IfcEventType.UserDefinedEventTriggerType. Required when
event_trigger_type is USERDEFINED (CorrectEventTriggerType).
assembly_place: Option<&'a str>IfcFurnitureType.AssemblyPlace, an IfcAssemblyPlaceEnum token;
required on IfcFurnitureType.
Implementations§
Source§impl<'a> TypeDraft<'a>
impl<'a> TypeDraft<'a>
Sourcepub fn description(self, value: &'a str) -> Self
pub fn description(self, value: &'a str) -> Self
Sets Description.
Sourcepub fn applicable_occurrence(self, value: &'a str) -> Self
pub fn applicable_occurrence(self, value: &'a str) -> Self
Sets ApplicableOccurrence.
Sourcepub fn maps_or_identification(self, value: Slot6<'a>) -> Self
pub fn maps_or_identification(self, value: Slot6<'a>) -> Self
Sets slot 6: RepresentationMaps or Identification.
Sourcepub fn tag_or_long_description(self, value: &'a str) -> Self
pub fn tag_or_long_description(self, value: &'a str) -> Self
Sets slot 7: Tag or LongDescription.
Sourcepub fn operation_type(self, value: &'a str) -> Self
pub fn operation_type(self, value: &'a str) -> Self
Sets IfcDoorType.OperationType.
Sourcepub fn user_defined_operation_type(self, value: &'a str) -> Self
pub fn user_defined_operation_type(self, value: &'a str) -> Self
Sets IfcDoorType.UserDefinedOperationType.
Sourcepub fn partitioning_type(self, value: &'a str) -> Self
pub fn partitioning_type(self, value: &'a str) -> Self
Sets IfcWindowType.PartitioningType.
Sourcepub fn user_defined_partitioning_type(self, value: &'a str) -> Self
pub fn user_defined_partitioning_type(self, value: &'a str) -> Self
Sets IfcWindowType.UserDefinedPartitioningType.
Sourcepub fn parameter_takes_precedence(self, value: bool) -> Self
pub fn parameter_takes_precedence(self, value: bool) -> Self
Sets ParameterTakesPrecedence (IfcDoorType, IfcWindowType).
Sourcepub fn event_trigger_type(self, value: &'a str) -> Self
pub fn event_trigger_type(self, value: &'a str) -> Self
Sets IfcEventType.EventTriggerType.
Sourcepub fn user_defined_event_trigger_type(self, value: &'a str) -> Self
pub fn user_defined_event_trigger_type(self, value: &'a str) -> Self
Sets IfcEventType.UserDefinedEventTriggerType.
Sourcepub fn assembly_place(self, value: &'a str) -> Self
pub fn assembly_place(self, value: &'a str) -> Self
Sets IfcFurnitureType.AssemblyPlace.