Enum dcbor::DecodeError
source · pub enum DecodeError {
Underrun,
UnsupportedHeaderValue(u8),
NonCanonicalInt,
NonCanonicalFloat,
InvalidString(Utf8Error),
UnusedData(usize),
MisorderedMapKey,
DuplicateMapKey,
IntegerOutOfRange,
WrongType,
WrongTag(Tag, Tag),
InvalidFormat,
}Expand description
An error encountered while decoding CBOR.
Variants§
Underrun
Early end of data.
UnsupportedHeaderValue(u8)
Unsupported value in CBOR header.
NonCanonicalInt
An integer was encoded in non-canonical form.
NonCanonicalFloat
A floating point value was encoded in non-canonical form.
InvalidString(Utf8Error)
An invalidly-encoded UTF-8 string was encountered.
UnusedData(usize)
The decoded CBOR had extra data at the end.
MisorderedMapKey
The decoded CBOR map has keys that are not in canonical order.
DuplicateMapKey
The decoded CBOR map has a duplicate key.
IntegerOutOfRange
The decoded integer could not be represented in the specified integer type.
WrongType
The decoded value was not the expected type.
WrongTag(Tag, Tag)
The decoded value did not have the expected tag.
The case includes the expected tag and encountered tag as associated data.
InvalidFormat
Invalid CBOR format. Frequently thrown by libraries depending on this one.
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
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()