#[non_exhaustive]pub enum ResourceError {
Show 19 variants
MissingSchema,
AmbiguousSchema {
tokens: Vec<String>,
},
UnsupportedSchema {
token: String,
},
NotInSchema {
schema: String,
entity: Option<EntityId>,
entity_type: String,
attribute: Option<&'static str>,
},
EntityNotFound {
id: EntityId,
},
WrongType {
id: EntityId,
expected: &'static str,
actual: String,
},
MissingAttribute {
entity: EntityId,
attribute: &'static str,
},
InvalidValue {
entity: EntityId,
attribute: &'static str,
expected: &'static str,
},
InvalidEnumeration {
entity: Option<EntityId>,
attribute: &'static str,
value: String,
},
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,
actual: usize,
},
DuplicateReference {
entity: EntityId,
attribute: &'static str,
target: EntityId,
},
SemanticViolation {
entity: Option<EntityId>,
rule: &'static str,
},
Cycle {
at: EntityId,
},
BudgetExceeded {
max_depth: usize,
max_nodes: usize,
},
InvalidDraft {
entity_type: &'static str,
attribute: &'static str,
expected: &'static str,
},
InvalidGlobalId,
TransactionConflict {
expected: u64,
actual: u64,
},
}Expand description
Why a resource projection, query, or authoring call could not be completed.
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 is not one this operation supports: reads cover IFC2X3 TC1, IFC4 ADD2 TC1 and IFC4X3 ADD2; authoring covers IFC4 ADD2 TC1 and IFC4X3 ADD2.
NotInSchema
The view’s release does not declare what an accessor reads, in the form it reads it.
IFC2X3 TC1 declares no IfcResourceTime and no resource types, and
its IfcConstructionResource carries no LongDescription, Usage,
BaseCosts or PredefinedType; its BaseQuantity is an
IfcMeasureWithUnit rather than an IfcPhysicalQuantity. Asking for
one of those under IFC2X3 is this refusal, never None, so “the
release cannot hold it” stays distinct from “the file left it unset”.
The IFC2X3-only accessors refuse the same way under IFC4 and IFC4X3.
Fields
EntityNotFound
A requested entity id does not exist in the model.
WrongType
An entity was not the IFC type the caller requested.
Fields
MissingAttribute
The stored record is shorter than the schema’s attribute list, so a
declared attribute has no slot. (An attribute the release does not
declare at all is ResourceError::NotInSchema.)
Fields
InvalidValue
An attribute was present but held the wrong kind of value.
Fields
InvalidEnumeration
An enumeration attribute held a value the schema does not declare.
Fields
DanglingReference
An entity reference attribute pointed at an id the model does not contain.
Fields
WrongReferenceType
An entity reference resolved, but the target is not the IFC type the slot requires.
Fields
InvalidCardinality
An aggregate attribute held fewer items than the schema’s minimum cardinality.
Fields
DuplicateReference
A SET attribute repeated the same reference more than once.
Fields
SemanticViolation
A WHERE rule or other cross-attribute IFC semantic constraint failed.
Fields
Cycle
A resource composition or nesting traversal revisited an entity.
BudgetExceeded
A bounded traversal exceeded its depth or node budget.
Fields
InvalidDraft
A staged authoring draft could not be committed as written.
Fields
InvalidGlobalId
A supplied GlobalId is not a valid 22-character compressed IFC GUID.
TransactionConflict
A transaction commit conflicted with a concurrent revision.
Trait Implementations§
Source§impl Clone for ResourceError
impl Clone for ResourceError
Source§fn clone(&self) -> ResourceError
fn clone(&self) -> ResourceError
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 ResourceError
impl Debug for ResourceError
Source§impl Display for ResourceError
impl Display for ResourceError
impl Eq for ResourceError
Source§impl Error for ResourceError
impl Error for ResourceError
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()