#[non_exhaustive]pub enum ClassificationError {
Show 19 variants
WrongEntityType {
expected: &'static str,
actual: String,
},
MissingAttribute {
entity: &'static str,
id: EntityId,
attribute: &'static str,
},
InvalidValue {
entity: &'static str,
id: EntityId,
attribute: &'static str,
value: String,
},
UnknownEntity {
id: EntityId,
},
DanglingReference {
entity: &'static str,
id: EntityId,
attribute: &'static str,
target: EntityId,
},
ReferenceType {
entity: &'static str,
id: EntityId,
attribute: &'static str,
target: EntityId,
expected: &'static str,
actual: String,
},
Cycle {
path: Vec<EntityId>,
},
BudgetExceeded {
max_depth: usize,
max_nodes: usize,
},
AmbiguousType {
object: EntityId,
count: usize,
},
AuthoringInvalid {
entity: &'static str,
attribute: &'static str,
value: String,
},
AuthoringReferenceType {
target: EntityId,
expected: &'static str,
actual: String,
},
MultipleSchemas {
schemas: usize,
},
NotInSchema {
entity: &'static str,
id: EntityId,
attribute: &'static str,
schema: SchemaVersion,
},
StructuredValue {
entity: &'static str,
id: EntityId,
attribute: &'static str,
target: EntityId,
},
UnsupportedSchema {
schema: String,
},
EntityNotInSchema {
entity: &'static str,
schema: SchemaVersion,
},
AuthoringNotInSchema {
entity: &'static str,
attribute: &'static str,
schema: SchemaVersion,
},
AuthoringRequired {
entity: &'static str,
attribute: &'static str,
schema: SchemaVersion,
},
AuthoringValueType {
entity: &'static str,
attribute: &'static str,
declared: &'static str,
schema: SchemaVersion,
},
}Expand description
Failure decoding, cross-checking, or authoring classification/document/library records.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
WrongEntityType
Entity did not have the expected IFC type.
Fields
MissingAttribute
A required attribute was unset ($ or *) or absent.
Fields
InvalidValue
An attribute was present but failed to decode as its expected shape.
Fields
UnknownEntity
A referenced entity id does not exist in the model.
DanglingReference
An attribute reference points at an id that is not present in the model.
Fields
ReferenceType
An attribute reference resolves but the target entity has the wrong type for its select.
Fields
Cycle
Following ReferencedSource links revisited an already-seen entity.
BudgetExceeded
Hierarchy traversal exceeded the caller-supplied node or depth budget.
Fields
AmbiguousType
An occurrence object is related to more than one IfcRelDefinesByType type.
Fields
AuthoringInvalid
A draft value failed schema validation before staging.
Fields
AuthoringReferenceType
A draft reference resolves to a staged or committed entity of the wrong type.
Fields
MultipleSchemas
The header declares several schemas, so no single release can be bound to read or write the model against.
NotInSchema
The release the model is read against does not define this attribute
or record, for example Description on an IFC2X3 IfcClassification
or any IfcExternalReferenceRelationship in an IFC2X3 model. This is
never reported as an unset (None) value.
Fields
schema: SchemaVersionThe release the model is read against.
StructuredValue
A text accessor met an attribute the bound release types as an entity
record, such as an IFC2X3 IfcCalendarDate edition date. The value is
valid; read it structurally through target.
Fields
UnsupportedSchema
The header declares one schema this crate has no bundled table for, so no slot position can be trusted. Never read as IFC4.
EntityNotInSchema
An authoring call would write a record type the model’s release
cannot instantiate, such as an IfcExternalReferenceRelationship
into an IFC2X3 model.
Fields
schema: SchemaVersionThe release the model is bound to.
AuthoringNotInSchema
An authoring call supplied a value for an attribute the model’s
release does not declare, such as a Description for an IFC2X3
IfcClassification. The value is refused, never silently dropped.
Fields
schema: SchemaVersionThe release the model is bound to.
AuthoringRequired
The model’s release requires an attribute the authoring call leaves
unset, such as the IFC2X3 IfcRoot.OwnerHistory or the IFC2X3
IfcClassification.Source.
Fields
schema: SchemaVersionThe release the model is bound to.
AuthoringValueType
An authoring call supplied text for an attribute the model’s release
types as an entity record, such as an IFC2X3 IfcCalendarDate
EditionDate. The text is refused rather than written into a slot
that cannot hold it.
Trait Implementations§
Source§impl Clone for ClassificationError
impl Clone for ClassificationError
Source§impl Debug for ClassificationError
impl Debug for ClassificationError
Source§impl Display for ClassificationError
impl Display for ClassificationError
Source§impl Error for ClassificationError
impl Error for ClassificationError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()