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(Box<Debug>)

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

max: usize
actual: u64
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: Type
info: u8
UnexpectedBreak

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

Trait Implementations

impl Debug for DecodeError
[src]

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

Formats the value using the given formatter.

impl Display for DecodeError
[src]

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

Formats the value using the given formatter.

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.