#[non_exhaustive]pub enum XmlError {
Show 22 variants
Malformed(String),
BadId(String),
InvalidScalar {
kind: String,
value: String,
},
UnknownKind(String),
DuplicateSlot {
name: String,
slot: usize,
},
MissingSlot {
name: String,
slot: usize,
missing: usize,
},
Namespace {
element: String,
expected: &'static str,
found: Option<String>,
},
Profile {
expected: &'static str,
found: Option<String>,
},
Root {
found: Option<String>,
},
At {
path: XmlPath,
source: Box<XmlError>,
},
Write(String),
UnknownEntity {
name: String,
},
AbstractEntity {
name: String,
},
UnknownAttribute {
entity: String,
element: String,
attribute: String,
},
TypeMismatch {
declared: String,
found: String,
},
WrongForm {
attribute: String,
expected: &'static str,
found: &'static str,
},
UnresolvedReference {
id: String,
},
DuplicateId {
id: String,
},
InverseConflict {
inverse: String,
relationship: String,
attribute: String,
detail: String,
},
SchemaMismatch {
profile: &'static str,
schema: String,
},
Unrepresentable {
construct: String,
},
Unsupported {
construct: String,
},
}Expand description
Failures specific to reading or writing ifcXML.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Malformed(String)
The document is not well-formed XML.
BadId(String)
An id attribute was not in the expected i<number> form.
InvalidScalar
A typed scalar did not contain a value of its declared kind.
UnknownKind(String)
A non-empty explicit kind is not part of this lossless dialect.
DuplicateSlot
Two attributes or child elements of one entity name the same slot.
Fields
MissingSlot
A positional name skips slots that no schema declares as omittable.
Fields
Namespace
An element resolved outside the selected release namespace.
Fields
Profile
Root schema metadata disagrees with the selected release profile.
Fields
Root
A strict document did not have the required root element.
At
A parsing error with its entity/value location retained.
Write(String)
Writing to the output buffer failed.
UnknownEntity
An element names an entity type the schema does not declare.
AbstractEntity
An abstract entity was instantiated.
UnknownAttribute
An XML attribute or child element that no attribute of the entity declares. Never placed into a free slot.
Fields
TypeMismatch
A value whose kind the declared type does not admit: an integer in a label, a reference where a measure is declared, an entity or typed value outside its SELECT.
Fields
WrongForm
An attribute written in a form its declared type does not take in this layout: a simple value as a child element, or an entity reference as an XML attribute.
Fields
UnresolvedReference
A reference to an id no element of the document defines.
DuplicateId
Two elements define the same id.
InverseConflict
An inverse attribute implies a value its relationship contradicts.
Fields
SchemaMismatch
The schema given does not describe the selected release profile.
Unrepresentable
Model content the buildingSMART XSD configuration cannot carry exactly: a value a reader would read back differently, or that the release XSD would refuse. The XSD writer refuses it rather than write a different model or an invalid document.
Unsupported
Valid content this reader or writer does not implement. Refused, never approximated.
Implementations§
Trait Implementations§
Source§impl Error for XmlError
impl Error for XmlError
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()