#[non_exhaustive]pub enum XmlError {
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),
}Expand description
Failures specific to reading or writing ifcXML.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
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.
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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for XmlError
impl RefUnwindSafe for XmlError
impl Send for XmlError
impl Sync for XmlError
impl Unpin for XmlError
impl UnsafeUnpin for XmlError
impl UnwindSafe for XmlError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more