#[non_exhaustive]pub enum XmlError {
Malformed(Box<dyn Error + Send + Sync + 'static>),
Number {
text: String,
expected: &'static str,
source: Box<dyn Error + Send + Sync + 'static>,
},
Missing {
node: String,
what: &'static str,
},
Invalid {
node: String,
problem: &'static str,
},
Unsupported {
node: String,
element: &'static str,
text: String,
},
Archive(Box<dyn Error + Send + Sync + 'static>),
ArchiveSize {
limit: u64,
},
Encoding(FromUtf8Error),
Url {
url: String,
problem: &'static str,
},
Transport(Box<dyn Error + Send + Sync + 'static>),
}Expand description
Why a GenICam XML document could not be read or fetched.
Every variant names where the problem is and carries the error that caused
it, if any, as its source — never flattened
into text (ADR-0030).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Malformed(Box<dyn Error + Send + Sync + 'static>)
The document is not well-formed XML. The source is the XML reader’s own error.
Number
A number in the document does not parse as one.
Fields
Missing
A node or element lacks something the GenICam schema requires of it.
Fields
Invalid
A node or element is declared in a way the GenICam schema does not allow.
Fields
Unsupported
A node uses an element this crate does not implement yet, such as
<pLength>. The node is skipped; the rest of the document loads.
Fields
Archive(Box<dyn Error + Send + Sync + 'static>)
The document’s ZIP archive cannot be read. The source is the archive reader’s error.
ArchiveSize
The document’s ZIP archive holds no file, or one larger than limit
bytes.
Encoding(FromUtf8Error)
The document is not UTF-8.
Url
The device’s URL register names no document, or one this crate cannot
read: an HTTP or file URL, or a malformed local: one.
Fields
Transport(Box<dyn Error + Send + Sync + 'static>)
Reading the document from the device failed. The source is the transport’s error.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()