Skip to main content

PropertyAnomaly

Enum PropertyAnomaly 

Source
#[non_exhaustive]
pub enum PropertyAnomaly {
Show 19 variants TypedTwice { object: EntityId, kept: EntityId, rejected: EntityId, relation: EntityId, }, DuplicateSetName { owner: EntityId, kept: EntityId, rejected: EntityId, }, DuplicatePropertyName { set: EntityId, kept: EntityId, rejected: EntityId, }, TypeAttachedByRelationship { relationship: EntityId, type_object: EntityId, }, MissingDefinition { relationship: EntityId, definition: EntityId, }, MissingObject { relationship: EntityId, object: EntityId, }, QuantityUnitMismatch { quantity: EntityId, unit: EntityId, expected: &'static str, found: String, }, NegativeQuantity { quantity: EntityId, value: f64, }, QuantityValueMissing { quantity: EntityId, }, QuantityValueNotNumeric { quantity: EntityId, found: String, }, MissingMember { container: EntityId, member: EntityId, }, MemberNotReference { container: EntityId, attribute: &'static str, found: String, }, DuplicateMember { container: EntityId, attribute: &'static str, member: EntityId, }, ComplexCycle { complex: EntityId, member: EntityId, }, ComplexTooDeep { complex: EntityId, limit: usize, }, ComplexBudgetExceeded { complex: EntityId, limit: usize, }, NotATemplate { container: EntityId, member: EntityId, type_name: String, }, SlotCountMismatch { entity: EntityId, type_name: String, expected: usize, actual: usize, }, MalformedAttribute { entity: EntityId, attribute: &'static str, found: String, },
}
Expand description

A structural problem found while reading properties.

#[non_exhaustive]: new structural checks add variants without breaking callers that match on this type.

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.
§

TypedTwice

An object assigned two different types by IfcRelDefinesByType.

IFC4 IfcObject.IsTypedBy is SET [0:1]; IFC2X3 IfcObject WR1 allows at most one. The first relationship by id is kept, and only its type’s sets are inherited.

Fields

§object: EntityId

The object with two types.

§kept: EntityId

The type kept.

§rejected: EntityId

The type rejected.

§relation: EntityId

The IfcRelDefinesByType that was rejected.

§

DuplicateSetName

Two property sets of the same name on one owner.

IFC4 forbids it on both occurrences (IfcObject.UniquePropertySetNames) and types (IfcTypeObject.UniquePropertySetNames); IFC2X3 states no such rule. Either way the resolved view is keyed by name, so the set with the lower id is kept and the other is reported here rather than silently overwriting it.

Fields

§owner: EntityId

The occurrence or type holding both sets.

§kept: EntityId

The set kept.

§rejected: EntityId

The set not resolved.

§

DuplicatePropertyName

Two properties of the same name in one property set, or two property templates of the same name in one set or complex template.

Forbidden in IFC4 (IfcPropertySet.UniquePropertyNames) and IFC2X3 (WR32). PropertySet::property answers with the first in HasProperties order. For templates, IfcPropertySetTemplate and IfcComplexPropertyTemplate both carry UniquePropertyNames; set is then the template, and the first template in HasPropertyTemplates order is the one a check uses.

Fields

§set: EntityId

The property set.

§kept: EntityId

The property kept.

§rejected: EntityId

The property shadowed.

§

TypeAttachedByRelationship

An IfcTypeObject attached by IfcRelDefinesByProperties.

Forbidden by the NoRelatedTypeObject WHERE rule: a type carries its sets in HasPropertySets. The set is still reported, because refusing to read a common exporter bug helps nobody.

Fields

§relationship: EntityId

The offending relationship.

§type_object: EntityId

The type object that must not be there.

§

MissingDefinition

A relationship names a property definition absent from the file.

Fields

§relationship: EntityId

The relationship.

§definition: EntityId

The id it named.

§

MissingObject

A relationship names an object absent from the file.

Fields

§relationship: EntityId

The relationship.

§object: EntityId

The id it named.

§

QuantityUnitMismatch

A quantity states a unit whose type contradicts the quantity kind.

IfcQuantityLength.WR21 requires a LENGTHUNIT, and the sibling quantities carry the same rule. A file breaking it has stated two different things about the same number.

Fields

§quantity: EntityId

The quantity entity.

§unit: EntityId

The unit it named.

§expected: &'static str

The IfcUnitEnum the schema requires.

§found: String

The IfcUnitEnum the file stated.

§

NegativeQuantity

A simple quantity states a negative value.

Every IfcQuantity* carries WR22 : Value >= 0. (count included). A negative area is not a small error; it is a value no consumer should use for takeoff.

Fields

§quantity: EntityId

The quantity entity.

§value: f64

The value stated.

§

QuantityValueMissing

A simple quantity states no value.

The value attribute (LengthValue, AreaValue, …) is not OPTIONAL on any IfcQuantity*. The quantity stays in its set’s quantities as Quantity::Unresolved with UnresolvedValue::Missing, and is named here.

Fields

§quantity: EntityId

The quantity entity.

§

QuantityValueNotNumeric

A simple quantity’s value attribute holds something other than a number, such as text or a reference.

The quantity stays in its set’s quantities as Quantity::Unresolved with UnresolvedValue::NotNumeric, and is named here.

Fields

§quantity: EntityId

The quantity entity.

§found: String

The value found, rendered for the message.

§

MissingMember

A property set, quantity set, complex property or complex quantity, or a property set or complex template, lists a member id that is not in the file.

The member cannot be read, so it is absent from the resolved value.

Fields

§container: EntityId

The set or complex entity listing the member.

§member: EntityId

The id it named.

§

MemberNotReference

A member list holds an item that is not an entity reference.

IfcPropertySet.HasProperties, IfcComplexProperty.HasProperties, IfcElementQuantity.Quantities and IfcPhysicalComplexQuantity.HasQuantities are sets of entity references. An item such as a string or number names no member, so nothing is read for it.

Fields

§container: EntityId

The set or complex entity holding the list.

§attribute: &'static str

The list attribute, e.g. "HasProperties".

§found: String

The item found, rendered for the message.

§

DuplicateMember

A member list names the same entity more than once.

Each of those lists is an EXPRESS SET, which cannot hold one instance twice. The member is read once, at its first position.

Fields

§container: EntityId

The set or complex entity holding the list.

§attribute: &'static str

The list attribute, e.g. "Quantities".

§member: EntityId

The member listed again.

§

ComplexCycle

A complex property, complex quantity or complex property template reaches itself again through its members.

The schema forbids only a DIRECT self-member (IfcComplexProperty WR21, IfcPhysicalComplexQuantity.NoSelfReference, IfcComplexPropertyTemplate.NoSelfReference); a longer cycle is just as unresolvable. member is already being read higher up the same path, so it is left out of complex’s resolved members.

Fields

§complex: EntityId

The complex entity whose member list closes the cycle.

§member: EntityId

The member that re-enters the path.

§

ComplexTooDeep

Complex nesting deeper than the reader follows.

complex is resolved with its name and usage, but its members are not read.

Fields

§complex: EntityId

The complex entity whose members were not read.

§limit: usize

The nesting depth followed.

§

ComplexBudgetExceeded

One read followed more nested member references than its budget.

Members may legally be shared between complex properties, so a small file can expand into an enormous tree. Once the budget is spent, the remaining members of complex are not read.

Fields

§complex: EntityId

The complex entity whose remaining members were not read.

§limit: usize

The nested member references followed.

§

NotATemplate

A template’s member list, or an IfcRelDefinesByTemplate, names an entity that is not a template of the required kind.

HasPropertyTemplates is a SET [1:?] OF IfcPropertyTemplate and RelatingTemplate an IfcPropertySetTemplate. The entity is not read as a template.

Fields

§container: EntityId

The template or relationship naming it.

§member: EntityId

The entity named.

§type_name: String

Its IFC type name.

§

SlotCountMismatch

A record’s attribute count differs from what the bound release declares for its entity.

Attributes are read by name from that release’s table, so a short record would otherwise read its missing trailing attributes as unset. The attributes present are still read.

Fields

§entity: EntityId

The malformed record.

§type_name: String

Its IFC type name.

§expected: usize

The attribute count the release declares.

§actual: usize

The attribute count in the file.

§

MalformedAttribute

An attribute holds a value its declared type does not admit: a number where a label is declared, an enumeration constant that is not a member of the release’s enumeration, or a reference to an entity outside the declared type.

The value is still reported as written where the view has a place for it (an enumeration constant, a reference id), and left unset otherwise.

Fields

§entity: EntityId

The entity holding the attribute.

§attribute: &'static str

The attribute, as the schema names it.

§found: String

The value found, rendered for the message.

Trait Implementations§

Source§

impl Clone for PropertyAnomaly

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 PropertyAnomaly

Source§

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

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

impl PartialEq for PropertyAnomaly

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 PropertyAnomaly

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.