#[non_exhaustive]pub enum XmlError {
MalformedXml {
message: String,
},
UnexpectedElement {
expected: String,
found: String,
},
MissingElement {
parent: String,
element: String,
},
InvalidContent {
element: String,
value: String,
reason: String,
},
}Expand description
Error type for XML-level parsing failures.
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.
MalformedXml
The XML document was malformed.
UnexpectedElement
An unexpected element was encountered.
MissingElement
A required element was missing from its parent.
InvalidContent
An element contained invalid text content.
Trait Implementations§
Source§impl Error for XmlError
impl Error for XmlError
1.30.0 · 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()
impl Eq for XmlError
impl StructuralPartialEq for XmlError
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