//! Error type for `xml-core`.
usethiserror::Error;/// Errors that can occur while reading or writing XML with `xml-core`.
#[derive(Debug, Error)]pubenumError{/// An I/O error occurred while reading or writing.
#[error("I/O error: {0}")]
Io(#[from]std::io::Error),/// The underlying XML parser reported an error (malformed XML).
#[error("XML parsing error: {0}")]
Xml(#[from]quick_xml::Error),/// Decoding the text content of an event failed (e.g. invalid encoding).
#[error("text decoding error: {0}")]
Decoding(#[from]quick_xml::encoding::EncodingError),/// Un-escaping already-decoded text failed (e.g. an unknown or
/// malformed entity reference such as `&foo;`). Surfaced by
/// [`crate::decode_text`]/[`crate::decode_attribute_value`], which pair
/// `quick_xml`'s decoding with the matching un-escaping step — see
/// their doc comments for why both are needed.
#[error("XML unescaping error: {0}")]
Unescaping(#[from]quick_xml::escape::EscapeError),}/// A [`Result`](std::result::Result) alias using [`Error`] as the error type.
pubtypeResult<T>=std::result::Result<T, Error>;