Skip to main content

ExactPropertyError

Enum ExactPropertyError 

Source
#[non_exhaustive]
pub enum ExactPropertyError {
Show 28 variants IncompleteModel { diagnostics: usize, }, MissingSchema, MultipleSchemas { schemas: usize, }, UnsupportedSchema { schema: String, }, MissingReference { from: EntityId, to: EntityId, }, MalformedAggregate { entity: EntityId, attribute: &'static str, }, MultipleTypeAssignments { object: EntityId, first: EntityId, second: EntityId, }, InvalidOccurrenceTarget { relationship: EntityId, object: EntityId, }, InvalidTypeTarget { relationship: EntityId, object: EntityId, }, InvalidQueryObject { object: EntityId, type_name: Arc<str>, }, DuplicateAggregateMember { entity: EntityId, attribute: &'static str, member: EntityId, }, DuplicateMatchingSets { source: ExactSource, first: EntityId, second: EntityId, }, DuplicateMatchingProperties { set: EntityId, first: EntityId, second: EntityId, }, MalformedName { entity: EntityId, attribute: &'static str, }, UnsupportedDefinition { entity: EntityId, type_name: Arc<str>, }, UnsupportedProperty { entity: EntityId, type_name: Arc<str>, }, MissingValueSlot { property: EntityId, }, MalformedEntitySlots { entity: EntityId, type_name: Arc<str>, expected: usize, actual: usize, }, UnsupportedUnit { property: EntityId, }, UnsupportedValue { property: EntityId, }, NonFiniteReal { property: EntityId, }, NotInSchema { entity: EntityId, name: Arc<str>, schema: SchemaVersion, }, InconsistentValues { entity: EntityId, rule: &'static str, }, NotAPredefinedSet { name: Arc<str>, schema: SchemaVersion, }, UnsupportedRelationship { relationship: EntityId, type_name: Arc<str>, }, ComplexCycle { complex: EntityId, member: EntityId, }, ComplexTooDeep { complex: EntityId, limit: usize, }, ComplexBudgetExceeded { complex: EntityId, limit: usize, },
}
Expand description

Why a property cannot be resolved exactly.

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

IncompleteModel

The model carries STEP-level diagnostics, so exactness cannot be guaranteed; count of diagnostics is reported for context.

Fields

§diagnostics: usize

Number of diagnostics recorded against the model.

§

MissingSchema

The model header declares no FILE_SCHEMA.

§

MultipleSchemas

The model header declares more than one schema.

Fields

§schemas: usize

Number of schemas declared in the header.

§

UnsupportedSchema

The model header declares a schema other than IFC2X3, IFC4 or IFC4X3 (IFC4X3_ADD2).

Fields

§schema: String

The declared schema token.

§

MissingReference

An entity reference points at an id absent from the model.

Fields

§from: EntityId

The entity holding the reference.

§to: EntityId

The entity id that could not be resolved.

§

MalformedAggregate

An aggregate attribute (list/set) was $, empty when required, or not encoded as a list at all.

Fields

§entity: EntityId

The entity whose attribute was malformed.

§attribute: &'static str

Name of the offending attribute.

§

MultipleTypeAssignments

The occurrence is assigned to more than one IfcTypeObject via IfcRelDefinesByType, which IFC forbids.

Fields

§object: EntityId

The occurrence with conflicting type assignments.

§first: EntityId

The first IfcTypeObject found.

§second: EntityId

The second, conflicting IfcTypeObject found.

§

InvalidOccurrenceTarget

IfcRelDefinesByProperties.RelatedObjects names an object that is not a non-type IfcObjectDefinition. A type object there is refused even when it is the queried object: its sets belong in its HasPropertySets (IFC4 and IFC4X3 NoRelatedTypeObject; IFC2X3 admits only IfcObject).

Fields

§relationship: EntityId

The IfcRelDefinesByProperties relationship.

§object: EntityId

The invalid related object.

§

InvalidTypeTarget

IfcRelDefinesByType.RelatedObjects names an object that is not an IfcObject.

Fields

§relationship: EntityId

The IfcRelDefinesByType relationship.

§object: EntityId

The invalid related object.

§

InvalidQueryObject

The queried entity can carry no property sets in the declared release: it is neither an object IfcRelDefinesByProperties may relate (IfcObject in IFC2X3, a non-type IfcObjectDefinition in IFC4 and IFC4X3) nor an IfcTypeObject (accepted since #193). For a material query (#218): the entity is no material definition the release’s IfcMaterialProperties.Material accepts.

Fields

§object: EntityId

The rejected query object.

§type_name: Arc<str>

The object’s actual IFC type name.

§

DuplicateAggregateMember

The same entity id appears more than once in an aggregate attribute that must have unique members.

Fields

§entity: EntityId

The entity holding the aggregate.

§attribute: &'static str

Name of the offending attribute.

§member: EntityId

The entity id that appeared more than once.

§

DuplicateMatchingSets

Two property sets with the same name matched the query for the same source (occurrence or type), making the result ambiguous.

Fields

§source: ExactSource

Whether the ambiguity arose among occurrence or type sets.

§first: EntityId

The first matching property set.

§second: EntityId

The second, conflicting matching property set.

§

DuplicateMatchingProperties

Two properties with the same name matched within the same set.

Fields

§set: EntityId

The IfcPropertySet containing the ambiguous properties.

§first: EntityId

The first matching property.

§second: EntityId

The second, conflicting matching property.

§

MalformedName

A Name attribute expected to be a string was $, a reference, or otherwise not text.

Fields

§entity: EntityId

The entity whose name attribute was malformed.

§attribute: &'static str

Name of the offending attribute (normally "Name").

§

UnsupportedDefinition

A RelatingPropertyDefinition reference resolves to an entity that is not an IfcPropertySetDefinition; or a predefined property set holds the requested name in an attribute this resolver cannot read exactly (an aggregate, such as IfcReinforcementDefinitionProperties.ReinforcementSectionDefinitions); or a predefined set that states no Name, and so cannot be ruled out by a set name, has an attribute of the requested name (#66).

Fields

§entity: EntityId

The rejected entity.

§type_name: Arc<str>

The entity’s actual IFC type name.

§

UnsupportedProperty

A member of IfcPropertySet.HasProperties or IfcComplexProperty.HasProperties is not an IfcProperty, or a member of IfcElementQuantity.Quantities or IfcPhysicalComplexQuantity.HasQuantities is not an IfcPhysicalQuantity.

Fields

§entity: EntityId

The rejected entity.

§type_name: Arc<str>

The entity’s actual IFC type name.

§

MissingValueSlot

A value the release requires was $: a quantity’s value, or a required value of another kind (IFC2X3 IfcPropertyReferenceValue.PropertyReference).

Fields

§property: EntityId

The property with the missing value.

§

MalformedEntitySlots

An entity’s attribute count does not match what the declared release’s schema declares for its type (a malformed or truncated STEP record).

Fields

§entity: EntityId

The malformed entity.

§type_name: Arc<str>

The entity’s IFC type name.

§expected: usize

Attribute count the schema declares for this type.

§actual: usize

Attribute count actually present on the entity.

§

UnsupportedUnit

IfcPropertySingleValue.Unit references an entity that is not a member of the IfcUnit select.

Fields

§property: EntityId

The property with the invalid unit reference.

§

UnsupportedValue

IfcPropertySingleValue.NominalValue carries a typed value whose declared type is not accepted by IFCVALUE, or whose payload does not match its declared type.

Fields

§property: EntityId

The property with the invalid value.

§

NonFiniteReal

IfcPropertySingleValue.NominalValue is an IFCREAL that is NaN or infinite, which IFC does not permit.

Fields

§property: EntityId

The property with the non-finite real value.

§

NotInSchema

A traversed record, typed value, or select member names a construct that the release declared in FILE_SCHEMA does not define, for example an IfcDoorType or an IfcPropertySetDefinitionSet in an IFC2X3 file. The file mixes releases, so nothing it says about the property is trusted.

Fields

§entity: EntityId

The entity holding or being the foreign construct.

§name: Arc<str>

The construct’s name as written in the file.

§schema: SchemaVersion

The release the header declares.

§

InconsistentValues

Values that the property’s release constrains contradict one of those constraints, so no one reading of them is exact: list members or bounds of different types, table columns of unequal length, a selected value missing from the referenced enumeration, or a repeated member of a LIST OF UNIQUE.

Fields

§entity: EntityId

The property or IfcPropertyEnumeration holding the values.

§rule: &'static str

The release’s label of the violated WHERE rule (for example WR31, or SameUnitUpperLower in IFC4), or <Attribute> UNIQUE for a repeated member of a unique list.

§

NotAPredefinedSet

The entity name given to exact_predefined_sets is not a predefined property set in the declared release: not declared there at all, or an IfcPropertySet, a quantity set, or one of their supertypes.

Fields

§name: Arc<str>

The entity name as requested.

§schema: SchemaVersion

The release the header declares.

§

UnsupportedRelationship

A proper subtype of IfcRelDefinesByProperties or IfcRelDefinesByType relates the queried object, such as IFC2X3 IfcRelOverridesProperties. Its semantics change which value applies, and the exact resolver does not interpret them, so it refuses rather than answer as if the relationship were absent.

Fields

§relationship: EntityId

The relationship instance.

§type_name: Arc<str>

Its IFC type name.

§

ComplexCycle

A complex property or quantity reaches itself again through its members (#208). The schema forbids only a direct self-member; a longer cycle has no finite resolution either.

Fields

§complex: EntityId

The complex whose member list closes the cycle.

§member: EntityId

The member already being resolved higher up the path.

§

ComplexTooDeep

A complex property or quantity nested deeper than the resolver follows below one set member (#208).

Fields

§complex: EntityId

The complex whose members would exceed the depth.

§limit: usize

The nesting depth followed.

§

ComplexBudgetExceeded

Resolving one set member followed more nested member references than its budget (#208). Members may be shared between complexes, so a small file can expand into an enormous tree.

Fields

§complex: EntityId

The complex whose member exceeded the budget.

§limit: usize

The nested member references followed.

Trait Implementations§

Source§

impl Clone for ExactPropertyError

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 ExactPropertyError

Source§

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

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

impl Display for ExactPropertyError

Source§

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

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

impl Eq for ExactPropertyError

Source§

impl Error for ExactPropertyError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<ExactPropertyError> for ExactUnitError

Source§

fn from(error: ExactPropertyError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for ExactPropertyError

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 ExactPropertyError

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.