pub enum DeserializationError {
InvalidValue(String),
UnexpectedEOF,
UnconsumedBytes,
UnknownError(String),
}
Expand description
Defines errors which can occur during deserialization.
Variants§
InvalidValue(String)
Bytes in the input do not represent a valid value.
UnexpectedEOF
An end of input was reached before a valid value could be deserialized.
UnconsumedBytes
Deserialization has finished but not all bytes have been consumed.
UnknownError(String)
An unknown error has occurred.
Trait Implementations§
Source§impl Clone for DeserializationError
impl Clone for DeserializationError
Source§fn clone(&self) -> DeserializationError
fn clone(&self) -> DeserializationError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DeserializationError
impl Debug for DeserializationError
Source§impl Display for DeserializationError
impl Display for DeserializationError
Source§impl Error for DeserializationError
impl Error for DeserializationError
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
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 PartialEq for DeserializationError
impl PartialEq for DeserializationError
impl Eq for DeserializationError
impl StructuralPartialEq for DeserializationError
Auto Trait Implementations§
impl Freeze for DeserializationError
impl RefUnwindSafe for DeserializationError
impl Send for DeserializationError
impl Sync for DeserializationError
impl Unpin for DeserializationError
impl UnwindSafe for DeserializationError
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