pub enum DeError {
Custom(String),
InvalidXml(Error),
KeyNotRead,
UnexpectedStart(Vec<u8>),
UnexpectedEof,
}Expand description
(De)serialization error
Variants§
Custom(String)
Serde custom error
InvalidXml(Error)
Xml parsing error
KeyNotRead
This error indicates an error in the Deserialize
implementation when read a map or a struct: MapAccess::next_value[_seed]
was called before MapAccess::next_key[_seed].
You should check your types, that implements corresponding trait.
UnexpectedStart(Vec<u8>)
Deserializer encounter a start tag with a specified name when it is not expecting. This happens when you try to deserialize a primitive value (numbers, strings, booleans) from an XML element.
UnexpectedEof
The Reader produced Event::Eof when it is not expecting,
for example, after producing Event::Start but before corresponding
Event::End.
Trait Implementations§
Source§impl Error for DeError
impl Error for DeError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl Error for DeError
impl Error for DeError
Source§fn custom<T>(msg: T) -> DeErrorwhere
T: Display,
fn custom<T>(msg: T) -> DeErrorwhere
T: Display,
Raised when there is general error when deserializing a type. Read more
Source§fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
Raised when a
Deserialize receives a type different from what it was
expecting. Read moreSource§fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
Raised when a
Deserialize receives a value of the right type but that
is wrong for some other reason. Read moreSource§fn invalid_length(len: usize, exp: &dyn Expected) -> Self
fn invalid_length(len: usize, exp: &dyn Expected) -> Self
Raised when deserializing a sequence or map and the input data contains
too many or too few elements. Read more
Source§fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self
fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self
Raised when a
Deserialize enum type received a variant with an
unrecognized name.Source§fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self
fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self
Raised when a
Deserialize struct type received a field with an
unrecognized name.Source§fn missing_field(field: &'static str) -> Self
fn missing_field(field: &'static str) -> Self
Raised when a
Deserialize struct type expected to receive a required
field with a particular name but that field was not present in the
input.Source§fn duplicate_field(field: &'static str) -> Self
fn duplicate_field(field: &'static str) -> Self
Raised when a
Deserialize struct type received more than one of the
same field.Source§impl From<EncodingError> for DeError
impl From<EncodingError> for DeError
Source§fn from(e: EncodingError) -> DeError
fn from(e: EncodingError) -> DeError
Converts to this type from the input type.
Source§impl From<EscapeError> for DeError
impl From<EscapeError> for DeError
Source§fn from(e: EscapeError) -> DeError
fn from(e: EscapeError) -> DeError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DeError
impl !RefUnwindSafe for DeError
impl Send for DeError
impl Sync for DeError
impl Unpin for DeError
impl !UnwindSafe for DeError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.