#[non_exhaustive]pub enum Error {
Io(Arc<Error>),
Syntax(SyntaxError),
IllFormed(IllFormedError),
NotWellFormed(WellFormedError),
InvalidAttr(AttrError),
Encoding(EncodingError),
Escape(EscapeError),
Namespace(NamespaceError),
}Expand description
The error type used by this crate.
Marked #[non_exhaustive]: unlike quick-xml 0.41, this crate also reports
optional well-formedness constraints (see NotWellFormed)
and will keep growing past that upstream baseline, so a variant match must
carry a wildcard arm to stay source-compatible across releases.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(Arc<Error>)
An XML document cannot be read from the underlying source.
Contains a reference-counted I/O error to make the error type Cloneable.
Syntax(SyntaxError)
The document does not correspond to the XML grammar.
IllFormed(IllFormedError)
The document is not well-formed.
NotWellFormed(WellFormedError)
The document violates a well-formedness constraint that is checked only
when Config::check_well_formedness is enabled.
InvalidAttr(AttrError)
Attribute parsing error.
Encoding(EncodingError)
Encoding error.
Escape(EscapeError)
Escape error.
Namespace(NamespaceError)
The parsed XML has some namespace-related problem.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Source§impl From<EncodingError> for Error
impl From<EncodingError> for Error
Source§fn from(error: EncodingError) -> Error
fn from(error: EncodingError) -> Error
Creates a new Error::Encoding from the given error.
Source§impl From<EscapeError> for Error
impl From<EscapeError> for Error
Source§fn from(error: EscapeError) -> Error
fn from(error: EscapeError) -> Error
Creates a new Error::Escape from the given error.
Source§impl From<IllFormedError> for Error
impl From<IllFormedError> for Error
Source§fn from(error: IllFormedError) -> Self
fn from(error: IllFormedError) -> Self
Creates a new Error::IllFormed from the given error.
Source§impl From<NamespaceError> for Error
impl From<NamespaceError> for Error
Source§fn from(error: NamespaceError) -> Self
fn from(error: NamespaceError) -> Self
Source§impl From<SyntaxError> for Error
impl From<SyntaxError> for Error
Source§fn from(error: SyntaxError) -> Self
fn from(error: SyntaxError) -> Self
Creates a new Error::Syntax from the given error.
Source§impl From<WellFormedError> for Error
impl From<WellFormedError> for Error
Source§fn from(error: WellFormedError) -> Self
fn from(error: WellFormedError) -> Self
Creates a new Error::NotWellFormed from the given error.