#[non_exhaustive]pub enum StructuralError {
Show 15 variants
MissingSchema,
AmbiguousSchema {
tokens: Vec<String>,
},
UnsupportedSchema {
token: String,
},
EntityNotFound {
id: EntityId,
},
WrongType {
id: EntityId,
expected: &'static str,
actual: String,
},
MissingAttribute {
entity: EntityId,
attribute: &'static str,
},
MissingRequired {
entity_type: String,
attribute: String,
},
UnsupportedAttribute {
entity_type: String,
attribute: String,
},
InvalidValue {
entity: EntityId,
attribute: &'static str,
expected: &'static str,
},
InvalidDraftValue {
entity_type: &'static str,
attribute: &'static str,
expected: &'static str,
},
DanglingReference {
entity: EntityId,
attribute: &'static str,
target: EntityId,
},
WrongReferenceType {
entity: EntityId,
attribute: &'static str,
target: EntityId,
expected: &'static str,
actual: String,
},
InvalidCardinality {
entity: EntityId,
attribute: &'static str,
minimum: usize,
maximum: Option<usize>,
actual: usize,
},
SemanticViolation {
entity: Option<EntityId>,
rule: &'static str,
},
InvalidGlobalId,
}Expand description
Why a structural projection or draft was refused.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MissingSchema
The model header declares no FILE_SCHEMA token.
AmbiguousSchema
The header declares more than one schema, so the profile is ambiguous.
UnsupportedSchema
The declared schema token is not IFC2X3, IFC4, or IFC4X3.
EntityNotFound
An entity id was not found in the model.
WrongType
An entity was not the IFC type (or a subtype of it) the caller requested.
Fields
MissingAttribute
The entity’s declared type has no attribute of this name in the selected schema.
Fields
MissingRequired
A staged draft omitted an attribute that is mandatory for its IFC entity type.
Fields
UnsupportedAttribute
A staged draft set an attribute that does not exist for its type in the target schema.
Fields
InvalidValue
An attribute held a value of the wrong kind or shape for the schema.
Fields
InvalidDraftValue
A staged draft supplied a value of the wrong kind or shape for the attribute.
Fields
DanglingReference
An entity reference attribute points at an id absent from the model.
Fields
WrongReferenceType
An entity reference resolved, but the target is not one of the types the slot allows.
Fields
InvalidCardinality
A SET/LIST attribute had fewer or more members than the schema allows.
Fields
SemanticViolation
A structural semantic rule beyond plain schema shape was violated.
Used for constraints the EXPRESS schema cannot encode directly, such
as forbidding an IfcRelAssignsToGroup from assigning its own
RelatingGroup, or requiring ObjectType when PredefinedType is
USERDEFINED.
Fields
InvalidGlobalId
GlobalId was not a well-formed 22-character IFC GUID.
Trait Implementations§
Source§impl Clone for StructuralError
impl Clone for StructuralError
Source§impl Debug for StructuralError
impl Debug for StructuralError
Source§impl Display for StructuralError
impl Display for StructuralError
impl Eq for StructuralError
Source§impl Error for StructuralError
impl Error for StructuralError
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()