pub enum ErrorKind {
Show 23 variants
IoError(Error),
XmlError(Error),
AttrError(AttrError),
InvalidUtf8(Utf8Error),
EscapeError(EscapeError),
EncodingError(EncodingError),
DuplicateAttribute(RawByteStr),
DuplicateElement(RawByteStr),
UnexpectedAttribute(RawByteStr),
MissingAttribute(RawByteStr),
MissingElement(RawByteStr),
InvalidData(RawByteStr),
MissingContent,
DuplicateContent,
MissingAnyElement,
DuplicateAnyElement,
MissingName,
UnknownOrInvalidValue(RawByteStr),
InsufficientSize {
min: usize,
max: usize,
actual: usize,
},
InvalidUnion(UnionError),
Custom(Box<dyn StdError + Send + Sync>),
UnexpectedEvent(Event<'static>),
UnexpectedEof,
}
Expand description
Quick XML error kind.
Variants§
IoError(Error)
Error forwarded from the quick_xml
crate.
XmlError(Error)
Error forwarded from the quick_xml
crate.
AttrError(AttrError)
Attribute error forwarded from the quick_xml
crate.
InvalidUtf8(Utf8Error)
Invalid UTF-8 string.
EscapeError(EscapeError)
Escape Error
EncodingError(EncodingError)
Encoding Error
DuplicateAttribute(RawByteStr)
Duplicate attribute.
The attribute was expected only once.
DuplicateElement(RawByteStr)
Duplicate element.
The element was expected only once.
UnexpectedAttribute(RawByteStr)
Unexpected attribute.
The attribute was not expected for the current element.
MissingAttribute(RawByteStr)
Missing attribute.
The attribute was expected to be present, but it was not.
MissingElement(RawByteStr)
Missing element.
The element was expected to be present, but it was not.
InvalidData(RawByteStr)
Invalid data.
MissingContent
Missing content.
The element was expected to have some content, but it haven’t.
DuplicateContent
Duplicate content.
The content was expected only once.
MissingAnyElement
Missing any element.
The element was expected to have at least one xs:any
element, but it haven’t.
DuplicateAnyElement
Duplicate content.
The xs:any
element is only expected once.
MissingName
Missing name.
The serializer is not able to set a default name for the specified value.
UnknownOrInvalidValue(RawByteStr)
Unknown or invalid value.
InsufficientSize
Insufficient size.
The element or attribute contains less items then expected.
Fields
InvalidUnion(UnionError)
Invalid union.
Custom(Box<dyn StdError + Send + Sync>)
Custom error.
Can store any kind of error.
UnexpectedEvent(Event<'static>)
Unexpected quick_xml
event.
UnexpectedEof
Unexpected end of file.
Trait Implementations§
Source§impl Error for Kind
impl Error for Kind
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
Source§impl From<EncodingError> for Kind
impl From<EncodingError> for Kind
Source§fn from(source: EncodingError) -> Self
fn from(source: EncodingError) -> Self
Source§impl From<EscapeError> for Kind
impl From<EscapeError> for Kind
Source§fn from(source: EscapeError) -> Self
fn from(source: EscapeError) -> Self
Auto Trait Implementations§
impl Freeze for Kind
impl !RefUnwindSafe for Kind
impl Send for Kind
impl Sync for Kind
impl Unpin for Kind
impl !UnwindSafe for Kind
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<X> SerializeBytes for Xwhere
X: ToString,
impl<X> SerializeBytes for Xwhere
X: ToString,
Source§impl<X> SerializeSync for Xwhere
X: WithSerializer,
impl<X> SerializeSync for Xwhere
X: WithSerializer,
Source§impl<X> WithBoxedSerializer for Xwhere
X: WithSerializer,
impl<X> WithBoxedSerializer for Xwhere
X: WithSerializer,
Source§impl<X> WithSerializer for Xwhere
X: SerializeBytes + Debug,
impl<X> WithSerializer for Xwhere
X: SerializeBytes + Debug,
Source§type Serializer<'x> = ContentSerializer<'x, X>
where
X: 'x
type Serializer<'x> = ContentSerializer<'x, X> where X: 'x
Source§fn serializer<'ser>(
&'ser self,
name: Option<&'ser str>,
is_root: bool,
) -> Result<<X as WithSerializer>::Serializer<'ser>, Error>
fn serializer<'ser>( &'ser self, name: Option<&'ser str>, is_root: bool, ) -> Result<<X as WithSerializer>::Serializer<'ser>, Error>
value
. Read more