Enum cbor::decoder::DecodeError
[−]
[src]
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<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
Fields of TooLong
max: usize | |
actual: u64 |
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
Fields of UnexpectedType
datatype: Type | |
info: u8 |
UnexpectedBreak
A break was encountered at some unexpected point while decoding an indefinite object.
Other(Box<Error + Send + Sync>)
Some other error.
Trait Implementations
impl Debug for DecodeError
[src]
impl Display for DecodeError
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl Error for DecodeError
[src]
fn description(&self) -> &str
A short description of the error. Read more
fn cause(&self) -> Option<&Error>
The lower-level cause of this error, if any. Read more
impl From<Error> for DecodeError
[src]
fn from(e: Error) -> DecodeError
Performs the conversion.
impl From<FromUtf8Error> for DecodeError
[src]
fn from(e: FromUtf8Error) -> DecodeError
Performs the conversion.
impl From<Utf8Error> for DecodeError
[src]
fn from(e: Utf8Error) -> DecodeError
Performs the conversion.
impl From<ReadSliceError> for DecodeError
[src]
fn from(e: ReadSliceError) -> DecodeError
Performs the conversion.