pub struct CompatDeserializationError(/* private fields */);
Expand description
An Error
-compatible wrapper for DeserializationError
.
Contains helper methods to convert to and from the wrapped type.
Trait Implementations§
Source§impl Debug for CompatDeserializationError
impl Debug for CompatDeserializationError
Source§impl Display for CompatDeserializationError
impl Display for CompatDeserializationError
Source§impl Error for CompatDeserializationError
impl Error for CompatDeserializationError
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · 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
Source§impl Error for CompatDeserializationError
impl Error for CompatDeserializationError
Source§fn custom<T: Display>(message: T) -> Self
fn custom<T: Display>(message: T) -> Self
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<CompatDeserializationError> for DeserializationError
impl From<CompatDeserializationError> for DeserializationError
Source§fn from(wrapped_error: CompatDeserializationError) -> Self
fn from(wrapped_error: CompatDeserializationError) -> Self
Converts to this type from the input type.
Source§impl From<DeserializationError> for CompatDeserializationError
impl From<DeserializationError> for CompatDeserializationError
Source§fn from(error: DeserializationError) -> Self
fn from(error: DeserializationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CompatDeserializationError
impl !RefUnwindSafe for CompatDeserializationError
impl Send for CompatDeserializationError
impl Sync for CompatDeserializationError
impl Unpin for CompatDeserializationError
impl !UnwindSafe for CompatDeserializationError
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<E> Fail for E
impl<E> Fail for E
Source§fn cause(&self) -> Option<&(dyn Fail + 'static)>
fn cause(&self) -> Option<&(dyn Fail + 'static)>
Returns a reference to the underlying cause of this failure, if it
is an error that wraps other errors. Read more
Source§fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the
Backtrace
carried by this failure, if it
carries one. Read more