#[non_exhaustive]pub enum ConstraintError {
Show 17 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,
},
Semantic {
entity: &'static str,
id: EntityId,
rule: &'static str,
detail: String,
},
AuthoringInvalid {
entity: &'static str,
attribute: &'static str,
value: String,
},
AuthoringReferenceType {
target: EntityId,
expected: &'static str,
actual: String,
},
MultipleSchemas {
schemas: usize,
},
UnsupportedSchema {
schema: String,
},
NotInSchema {
entity: &'static str,
id: EntityId,
attribute: &'static str,
schema: SchemaVersion,
},
StructuredValue {
entity: &'static str,
id: EntityId,
attribute: &'static str,
target: EntityId,
},
EntityNotInSchema {
entity: &'static str,
schema: SchemaVersion,
},
AuthoringNotInSchema {
entity: &'static str,
attribute: &'static str,
schema: SchemaVersion,
},
AuthoringValueType {
entity: &'static str,
attribute: &'static str,
declared: &'static str,
schema: SchemaVersion,
},
AuthoringRequired {
entity: &'static str,
attribute: &'static str,
schema: SchemaVersion,
},
}Expand description
Constraint projection or authoring failure.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
WrongEntityType
Entity kind differs from the requested projection.
MissingAttribute
Required positional attribute is absent or null.
Fields
InvalidValue
Attribute has the wrong value shape or cardinality.
Fields
UnknownEntity
Requested entity is absent.
DanglingReference
Authored or projected reference does not resolve.
Fields
ReferenceType
Resolved reference is outside the declared IFC SELECT/type.
Fields
Semantic
Declared WHERE-style rule failed.
Fields
AuthoringInvalid
Draft value is invalid before staging.
Fields
AuthoringReferenceType
Draft reference is outside the required entity/SELECT.
Fields
MultipleSchemas
The model’s header declares several schemas; authoring binds to exactly one release.
UnsupportedSchema
The model’s header declares one schema this crate is not verified against (anything but IFC2X3, IFC4 and IFC4X3), so no layout can be trusted. Never read or written as another release.
NotInSchema
An accessor asked for an attribute the model’s release does not
declare, such as ReferencePath on an IFC2X3 IfcMetric. Never read
from the slot another release gives it (#212).
Fields
schema: SchemaVersionThe release the model is read against.
StructuredValue
A text accessor met an attribute the release types as an entity
record, such as the IFC2X3 IfcConstraint.CreationTime, an
IfcDateTimeSelect. The value is valid; read it through target.
Fields
EntityNotInSchema
The model’s release does not declare this entity, such as
IfcResourceConstraintRelationship or IfcReference in IFC2X3.
AuthoringNotInSchema
A draft supplied a value for an attribute the model’s release does
not declare, such as a ReferencePath for an IFC2X3 IfcMetric. It
is refused rather than dropped.
Fields
schema: SchemaVersionThe release the model declares.
AuthoringValueType
A draft supplied a value in a form the release’s declaration cannot
hold, such as text where IFC2X3 declares an IfcDateTimeSelect
record, a token its enumeration lacks, or several benchmark values
where IFC2X3 declares one IfcMetric.
Fields
schema: SchemaVersionThe release the model declares.
AuthoringRequired
The model’s release requires an attribute the authoring call leaves
unset, such as the IFC2X3 IfcRoot.OwnerHistory, the IFC2X3
IfcRelAssociatesConstraint.Intent or the IFC2X3 IfcMetric.DataValue.
Trait Implementations§
Source§impl Clone for ConstraintError
impl Clone for ConstraintError
Source§fn clone(&self) -> ConstraintError
fn clone(&self) -> ConstraintError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConstraintError
impl Debug for ConstraintError
Source§impl Display for ConstraintError
impl Display for ConstraintError
Source§impl Error for ConstraintError
impl Error for ConstraintError
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()