pub enum XmlError {
WellFormedness(WellFormednessError),
Namespace(NamespaceError),
XPath(XPathError),
Validation(ValidationError),
UnexpectedEof,
Parse(ParseError),
}Expand description
Represents all possible errors that can occur during XML processing.
Variants§
WellFormedness(WellFormednessError)
The document is not well-formed XML.
Namespace(NamespaceError)
A namespace-related error.
XPath(XPathError)
An XPath evaluation error.
Validation(ValidationError)
An XSD validation error.
UnexpectedEof
An unexpected end of input.
Parse(ParseError)
A generic parse error with a message.
Implementations§
Source§impl XmlError
impl XmlError
Sourcepub fn parse(message: impl Into<String>, line: usize, column: usize) -> Self
pub fn parse(message: impl Into<String>, line: usize, column: usize) -> Self
Create a ParseError with the given message and source location.
Sourcepub fn well_formedness(
message: impl Into<String>,
line: usize,
column: usize,
) -> Self
pub fn well_formedness( message: impl Into<String>, line: usize, column: usize, ) -> Self
Create a WellFormednessError with the given message and source location.
Sourcepub fn namespace(message: impl Into<String>, line: usize, column: usize) -> Self
pub fn namespace(message: impl Into<String>, line: usize, column: usize) -> Self
Create a NamespaceError with the given message and source location.
Sourcepub fn xpath(message: impl Into<String>) -> Self
pub fn xpath(message: impl Into<String>) -> Self
Create an XPathError with the given message.
Sourcepub fn validation(message: impl Into<String>) -> Self
pub fn validation(message: impl Into<String>) -> Self
Create a ValidationError with the given message (no source location).
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 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