Enum cbor::decoder::DecodeError [−] [src]

pub enum DecodeError {
    DuplicateKey(Box<Debug>),
    IntOverflow(u64),
    InvalidKey(Value),
    InvalidTag(Value),
    InvalidUtf8(Utf8Error),
    IoError(Error),
    TooLong {
        max: usize,
        actual: u64,
    },
    TooNested,
    UnexpectedEOF,
    UnexpectedType {
        datatype: Type,
        info: u8,
    },
    UnexpectedBreak,
}

Variants

DuplicateKey

An object contains the same key multiple times

IntOverflow

The signed integer is greater that its max value

InvalidKey

The decoded Value can not serve as a Key in an object

InvalidTag

The type of Value is not what is expected for a Tag

InvalidUtf8

The string is not encoded in UTF-8

IoError

Some I/O error

TooLong

The maximum configured length is exceeded

Fields

max
actual
TooNested

Values are nested deeper than the configured maximum

UnexpectedEOF

The end of file has been encountered unexpectedly

UnexpectedType

And unexpected type has been encountered

Fields

datatype
info
UnexpectedBreak

A break was encountered at some unexpected point while decoding an indefinite object.

Trait Implementations

impl Display for DecodeError

fn fmt(&self, f: &mut Formatter) -> Result<(), Error>

impl Error for DecodeError

fn description(&self) -> &str

fn cause(&self) -> Option<&Error>

impl From<Error> for DecodeError

fn from(e: Error) -> DecodeError

impl From<Error> for DecodeError

fn from(e: Error) -> DecodeError

impl From<FromUtf8Error> for DecodeError

fn from(e: FromUtf8Error) -> DecodeError

impl From<Utf8Error> for DecodeError

fn from(e: Utf8Error) -> DecodeError

impl From<ReadSliceError> for DecodeError

fn from(e: ReadSliceError) -> DecodeError

Derived Implementations

impl Debug for DecodeError

fn fmt(&self, __arg_0: &mut Formatter) -> Result