Skip to main content

TemplateFinding

Enum TemplateFinding 

Source
#[non_exhaustive]
pub enum TemplateFinding { MissingProperty { set: EntityId, template: EntityId, container: EntityId, property_template: EntityId, name: Arc<str>, }, UnexpectedProperty { set: EntityId, template: EntityId, container: EntityId, property: EntityId, name: Arc<str>, }, WrongForm { set: EntityId, template: EntityId, property: EntityId, property_template: EntityId, template_type: Option<Arc<str>>, expected: &'static [&'static str], found: Arc<str>, }, WrongMeasureType { set: EntityId, template: EntityId, property: EntityId, property_template: EntityId, measure: MeasureRole, attribute: &'static str, expected: Arc<str>, found: Arc<str>, }, WrongSetKind { set: EntityId, template: EntityId, template_type: Arc<str>, expected: &'static str, found: Arc<str>, }, WrongAttachment { set: EntityId, template: EntityId, object: EntityId, template_type: Arc<str>, found: Arc<str>, }, OutsideApplicableEntity { set: EntityId, template: EntityId, object: EntityId, found: Arc<str>, applicable_entity: Arc<str>, }, Undecided { set: EntityId, template: EntityId, subject: EntityId, reason: UndecidedReason, }, }
Expand description

One way a templated property set deviates from an IfcPropertySetTemplate linked to it by IfcRelDefinesByTemplate.

Every finding names the set and the set template; findings about one property also name the property and/or the (possibly nested) property template. A finding is a deviation from the in-file template, which is what the caller asked about; except where noted, IFC does not make it a schema violation.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

MissingProperty

A property template has no property of its Name in the set (or, for a nested template, in the complex property).

Fields

§set: EntityId

The templated set.

§template: EntityId

The IfcPropertySetTemplate.

§container: EntityId

The set, or the complex property or quantity whose members were compared.

§property_template: EntityId

The property template with no property.

§name: Arc<str>

Its Name.

§

UnexpectedProperty

A property whose Name no property template of the set template (or of the complex template) states.

Fields

§set: EntityId

The templated set.

§template: EntityId

The IfcPropertySetTemplate.

§container: EntityId

The set, or the complex property or quantity holding it.

§property: EntityId

The property or quantity.

§name: Arc<str>

Its Name.

§

WrongForm

A property whose entity is not the one its template’s TemplateType prescribes, e.g. an IfcPropertySingleValue where the template says P_ENUMERATEDVALUE.

Fields

§set: EntityId

The templated set.

§template: EntityId

The IfcPropertySetTemplate.

§property: EntityId

The property or quantity.

§property_template: EntityId

Its template.

§template_type: Option<Arc<str>>

The template’s TemplateType; None when unset, when any simple (for a simple template) or complex (for a complex one) property or quantity is expected.

§expected: &'static [&'static str]

The entities any of which would conform (subtypes included).

§found: Arc<str>

The property’s IFC type name.

§

WrongMeasureType

A value whose declared type is not the template’s measure type.

Fields

§set: EntityId

The templated set.

§template: EntityId

The IfcPropertySetTemplate.

§property: EntityId

The property.

§property_template: EntityId

Its template.

§measure: MeasureRole

Which measure type of the template applies.

§attribute: &'static str

The property attribute checked, e.g. NominalValue.

§expected: Arc<str>

The template’s measure type, as written.

§found: Arc<str>

The first nonconforming value’s type, or the referenced entity’s type for a reference value.

§

WrongSetKind

The set is not the entity the template’s TemplateType governs: a PSET_* template on an IfcElementQuantity, a QTO_* template on an IfcPropertySet, or (IFC4X3) a material- or profile-driven template on any property set definition.

Fields

§set: EntityId

The templated set.

§template: EntityId

The IfcPropertySetTemplate.

§template_type: Arc<str>

The template’s TemplateType.

§expected: &'static str

The entity the template type governs.

§found: Arc<str>

The set’s IFC type name.

§

WrongAttachment

The set sits on an object its template’s TemplateType excludes: a *_TYPEDRIVENONLY set on an occurrence, an *_OCCURRENCEDRIVEN set on a type, a PSET_PERFORMANCEDRIVEN set on anything but an IfcPerformanceHistory.

Fields

§set: EntityId

The templated set.

§template: EntityId

The IfcPropertySetTemplate.

§object: EntityId

The object carrying the set.

§template_type: Arc<str>

The template’s TemplateType.

§found: Arc<str>

The object’s IFC type name.

§

OutsideApplicableEntity

The set sits on an object that no entry of the template’s ApplicableEntity admits.

Fields

§set: EntityId

The templated set.

§template: EntityId

The IfcPropertySetTemplate.

§object: EntityId

The object carrying the set.

§found: Arc<str>

The object’s IFC type name.

§applicable_entity: Arc<str>

The template’s ApplicableEntity, as written.

§

Undecided

Whether subject conforms cannot be decided from the file and the release’s documentation.

Fields

§set: EntityId

The templated set.

§template: EntityId

The IfcPropertySetTemplate.

§subject: EntityId

What could not be decided: a property, a property template, the set template, or an object carrying the set.

§reason: UndecidedReason

Why.

Trait Implementations§

Source§

impl Clone for TemplateFinding

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TemplateFinding

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for TemplateFinding

Source§

impl PartialEq for TemplateFinding

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TemplateFinding

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.