#[non_exhaustive]pub enum ErrorKind {
NotUtf8,
Xml(String),
NotIds {
found: String,
},
UnsupportedVersion(Detected<IdsVersion>),
UnexpectedElement {
parent: String,
found: String,
},
MissingElement {
parent: String,
expected: &'static str,
},
UnexpectedAttribute {
element: String,
attribute: String,
},
MissingAttribute {
element: String,
attribute: &'static str,
},
InvalidValue {
location: String,
found: String,
expected: &'static str,
},
UnexpectedText {
element: String,
},
Unsupported {
element: String,
construct: String,
},
}Expand description
The kinds of ReadError.
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.
NotUtf8
The bytes are not UTF-8.
Xml(String)
The text is not well-formed XML, or uses a DTD.
NotIds
The root element is not <ids> in the IDS namespace.
UnsupportedVersion(Detected<IdsVersion>)
The document is not IDS 1.0, or its declaration contradicts its shape.
UnexpectedElement
An element that the schema does not allow here, or not in this order.
MissingElement
A required child element is missing.
UnexpectedAttribute
An attribute that the schema does not allow on this element.
Fields
MissingAttribute
A required attribute is missing.
InvalidValue
An element or attribute value outside its lexical space.
Fields
UnexpectedText
Character data inside an element that may only contain elements.
Unsupported
A valid XML Schema construct this reader does not represent.
Trait Implementations§
impl Eq for ErrorKind
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
impl Freeze for ErrorKind
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnsafeUnpin for ErrorKind
impl UnwindSafe for ErrorKind
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