#[non_exhaustive]pub enum MaterialError {
Show 16 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,
},
AuthoringInvalid {
entity: &'static str,
attribute: &'static str,
value: String,
},
AuthoringReferenceType {
target: EntityId,
expected: &'static str,
actual: String,
},
UnknownEntity {
id: EntityId,
},
DanglingReference {
source_id: EntityId,
target: EntityId,
},
ReferenceType {
source_id: EntityId,
target: EntityId,
expected: &'static str,
actual: String,
},
AmbiguousAssignment {
object: EntityId,
count: usize,
},
AmbiguousType {
object: EntityId,
count: usize,
},
MultipleSchemas {
schemas: usize,
},
UnsupportedSchema {
schema: String,
},
NotInSchema {
entity: &'static str,
id: EntityId,
attribute: &'static str,
schema: SchemaVersion,
},
EntityNotInSchema {
entity: &'static str,
id: Option<EntityId>,
schema: SchemaVersion,
},
AuthoringNotInSchema {
entity: &'static str,
attribute: &'static str,
schema: SchemaVersion,
},
AuthoringRequired {
entity: &'static str,
attribute: &'static str,
schema: SchemaVersion,
},
}Expand description
A malformed, ambiguous, or unresolved material projection.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
WrongEntityType
A projection expected one entity type but the model holds another.
Fields
MissingAttribute
A required attribute slot on the entity is absent (unset $).
Fields
InvalidValue
An attribute is present but its value violates a WHERE rule or type constraint.
Fields
AuthoringInvalid
A value supplied to an authoring function cannot be written to the named entity attribute.
Fields
AuthoringReferenceType
An authoring-time reference points at an entity of the wrong type.
Fields
UnknownEntity
A referenced entity id does not exist in the model.
DanglingReference
A reference field points at an id absent from the model.
Fields
ReferenceType
A reference resolves to an entity, but of the wrong type.
Fields
AmbiguousAssignment
The object is directly related to more than one IfcMaterial
via IfcRelAssociatesMaterial, so the single active material cannot
be determined.
Fields
AmbiguousType
The object is typed by more than one IfcTypeObject, so its
inherited material cannot be determined unambiguously.
Fields
MultipleSchemas
The header declares several schemas, so no single release can be bound to read or write the model against.
UnsupportedSchema
The header declares one schema this crate has no bundled table for, so no slot position can be trusted.
NotInSchema
The release the model is read against does not declare this
attribute, for example Category on an IFC2X3 IfcMaterial or
Name on an IFC2X3 IfcMaterialLayer. This is never reported as an
unset (None) value, and no other slot is read in its place.
Fields
schema: SchemaVersionThe release the model is read against.
EntityNotInSchema
The release the model is bound to has no instantiable entity of this
type, for example an IfcMaterialConstituentSet or
IfcMaterialProfileSet in an IFC2X3 model, or the abstract IFC2X3
IfcMaterialProperties. Such a record is refused, not decoded with
another release’s layout.
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 layer Name for an IFC2X3
model. The value is refused rather than 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.
Trait Implementations§
Source§impl Clone for MaterialError
impl Clone for MaterialError
Source§impl Debug for MaterialError
impl Debug for MaterialError
Source§impl Display for MaterialError
impl Display for MaterialError
Source§impl Error for MaterialError
impl Error for MaterialError
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()