#[non_exhaustive]pub enum AuthorError {
MissingEntity {
id: EntityId,
},
UnknownEntity {
entity: String,
},
UnknownAttribute {
entity: String,
attribute: String,
known: Vec<String>,
},
MissingRequired {
entity: String,
attribute: String,
},
DuplicateAttribute {
entity: String,
attribute: String,
},
TypeMismatch {
entity: String,
attribute: String,
expected: String,
found: String,
},
AggregateMismatch {
entity: String,
attribute: String,
expected_aggregate: bool,
},
InvalidGlobalId {
entity: String,
found: String,
},
DerivedAttribute {
entity: String,
attribute: String,
found: String,
},
NotDerived {
entity: String,
attribute: String,
},
ArityMismatch {
entity: String,
expected: usize,
found: usize,
},
ValueForm {
entity: String,
attribute: String,
declared: String,
typed_required: bool,
found: String,
},
}Expand description
A refused construction.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MissingEntity
The requested entity is not present in the model snapshot.
UnknownEntity
The schema does not declare this entity type.
Reported rather than ignored: silently accepting an unknown type is how a typo becomes a file other tools reject.
UnknownAttribute
The schema declares the entity, but not this attribute.
Fields
MissingRequired
A required (non-OPTIONAL) attribute was never set.
DuplicateAttribute
The same attribute was set twice.
A silent overwrite hides a copy-paste error in the caller.
TypeMismatch
The value does not match the attribute’s declared type.
Fields
AggregateMismatch
A scalar was supplied where the schema declares an aggregate, or vice versa.
Fields
InvalidGlobalId
A GlobalId was supplied that is not a valid 22-character IFC GUID.
DerivedAttribute
A slot the schema derives for this entity was given a value.
A subtype can redeclare an inherited attribute as DERIVEd, as
IfcSIUnit does with Dimensions. Part 21 writes such a slot as *:
neither a value nor $ is valid there. The builder writes * itself
when the slot is left unset.
Fields
NotDerived
* was supplied for a slot the schema does not derive for this entity.
Fields
ArityMismatch
An existing entity does not have the arity declared by the schema.
Fields
ValueForm
A value of the declared type, written in the form ISO 10303-21 does not use for it.
A typed parameter (IFCAREAMEASURE(12.5)) is written exactly where the
declared type is a SELECT, which needs it to say which member the
value is (§12.1.8); everywhere else the bare value is written
(§12.1.6, §12.1.7). A wrapper naming a different type than the one
declared is a TypeMismatch instead.
Trait Implementations§
Source§impl Clone for AuthorError
impl Clone for AuthorError
Source§impl Debug for AuthorError
impl Debug for AuthorError
Source§impl Display for AuthorError
impl Display for AuthorError
impl Eq for AuthorError
Source§impl Error for AuthorError
impl Error for AuthorError
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()