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
TooLongThe maximum configured length is exceeded
Fields
max: usize | |
actual: u64 |
TooNestedValues are nested deeper than the configured maximum
UnexpectedEOFThe end of file has been encountered unexpectedly
UnexpectedTypeAnd unexpected type has been encountered
Fields
datatype: Type | |
info: u8 |
UnexpectedBreakA 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]
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.