#[non_exhaustive]pub enum ControlError {
WrongEntityType {
expected: &'static str,
actual: String,
},
MissingAttribute {
entity: &'static str,
id: EntityId,
attribute: &'static str,
},
UnknownEntity {
id: EntityId,
},
AuthoringInvalid {
entity: &'static str,
attribute: &'static str,
value: String,
},
ForeignControl {
id: EntityId,
actual: String,
},
UnsupportedEntity {
schema: String,
entity: &'static str,
},
MultipleSchemas {
schemas: usize,
},
UnsupportedSchema {
schema: String,
},
AuthoringNotInSchema {
entity: &'static str,
attribute: &'static str,
schema: String,
},
AuthoringValueType {
entity: &'static str,
attribute: &'static str,
declared: String,
schema: String,
},
AuthoringRequired {
entity: &'static str,
attribute: String,
schema: String,
},
}Expand description
Control projection or authoring failure.
Only the variants this crate can actually raise are declared. A variant that no code path constructs is a promise the crate does not keep, and callers write dead match arms for it.
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
UnknownEntity
Requested entity is absent.
AuthoringInvalid
Draft value is invalid before staging, including an OwnerHistory
that is not an IfcOwnerHistory.
Fields
ForeignControl
The relating control of an assignment is not one this crate owns.
Cost schedules, cost items and work controls are IfcControls
too; their own crates write assignments to them.
UnsupportedEntity
The schema in use does not declare this entity.
Authoring an entity the schema omits is a caller error, not a silently-skipped attribute.
MultipleSchemas
The model’s header declares several schemas; release-bound authoring binds to exactly one.
UnsupportedSchema
The model’s header declares one schema with no bundled table, so no layout can be trusted.
AuthoringNotInSchema
A draft supplied a value for an attribute the release does not
declare, such as a PredefinedType for an IFC2X3 IfcPermit. It is
refused rather than dropped.
Fields
AuthoringValueType
A draft supplied a value the release’s declaration of the attribute cannot hold.
Fields
AuthoringRequired
The release requires an attribute the call leaves unset, such as the
IFC2X3 IfcRoot.OwnerHistory (#198, #202) or IfcPermit.PermitID.
It is refused rather than written as $; the *_with_owner_history
writers take the IfcOwnerHistory IFC2X3 needs.
Trait Implementations§
Source§impl Clone for ControlError
impl Clone for ControlError
Source§impl Debug for ControlError
impl Debug for ControlError
Source§impl Display for ControlError
impl Display for ControlError
Source§impl Error for ControlError
impl Error for ControlError
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()