pub enum DecodeError {
DuplicateKey(Key),
IntOverflow(u64),
InvalidKey(Value),
InvalidTag(Value),
InvalidUtf8(Utf8Error),
IoError(Error),
TooLong {
max: usize,
actual: u64,
},
TooNested,
UnexpectedEOF,
UnexpectedType {
datatype: Type,
info: u8,
},
UnexpectedBreak,
Other(Box<dyn Error + Send + Sync>),
}
Variants§
DuplicateKey(Key)
An object contains the same key multiple times
IntOverflow(u64)
The signed integer is greater that its max value
InvalidKey(Value)
The decoded Value
can not serve as a Key
in an object
InvalidTag(Value)
The type of Value
is not what is expected for a Tag
InvalidUtf8(Utf8Error)
The string is not encoded in UTF-8
IoError(Error)
Some I/O error
TooLong
The maximum configured length is exceeded
TooNested
Value
s are nested deeper than the configured maximum
UnexpectedEOF
The end of file has been encountered unexpectedly
UnexpectedType
And unexpected type has been encountered
UnexpectedBreak
A break was encountered at some unexpected point while decoding an indefinite object.
Other(Box<dyn Error + Send + Sync>)
Some other error.
Trait Implementations§
Source§impl Debug for DecodeError
impl Debug for DecodeError
Source§impl Display for DecodeError
impl Display for DecodeError
Source§impl Error for DecodeError
impl Error for DecodeError
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§impl From<Error> for DecodeError
impl From<Error> for DecodeError
Source§fn from(e: Error) -> DecodeError
fn from(e: Error) -> DecodeError
Converts to this type from the input type.
Source§impl From<FromUtf8Error> for DecodeError
impl From<FromUtf8Error> for DecodeError
Source§fn from(e: FromUtf8Error) -> DecodeError
fn from(e: FromUtf8Error) -> DecodeError
Converts to this type from the input type.
Source§impl From<ReadSliceError> for DecodeError
impl From<ReadSliceError> for DecodeError
Source§fn from(e: ReadSliceError) -> DecodeError
fn from(e: ReadSliceError) -> DecodeError
Converts to this type from the input type.
Source§impl From<Utf8Error> for DecodeError
impl From<Utf8Error> for DecodeError
Source§fn from(e: Utf8Error) -> DecodeError
fn from(e: Utf8Error) -> DecodeError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DecodeError
impl !RefUnwindSafe for DecodeError
impl Send for DecodeError
impl Sync for DecodeError
impl Unpin for DecodeError
impl !UnwindSafe for DecodeError
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