Enum saltpig::error::Error[][src]

pub enum Error {
    TypeError(TypeError),
    LengthExceeded(Majorusize),
    LengthSubsceeded(Majorusizeusize),
    ExpectedKey(usize),
    ExpectedValue(usize),
    TopLevelAlreadyExists,
    UnexpectedBreak,
    UnknownInfo(u8Major),
    NoMoreItems,
    DuplicateKey(OrdValue<'static>),
    Io(Error),
}

Errors produced by encoding or decoding CBOR data.

Variants

A value had the wrong type (or wrong length, tag, etc).

During encoding, too many elements were added to a determinate-length collection.

Not to be confused with TypeError::WrongLen.

During encoding, not enough elements were added to a determinate-length collection.

Not to be confused with TypeError::WrongLen.

An attempt was made to encode a map value when a key should have been encoded.

An attempt was made to encode a map key when a value should have been encoded.

An attempt was made to encode more than one top-level item.

During decoding, a break code was encountered in an unexpected position.

During decoding, an unknown additional-information value was encountered.

An attempt was made to decode an item from a stream that has no more items.

During encoding or decoding, a duplicate key was encountered in a map.

An IO error occurred.

Trait Implementations

impl Debug for Error
[src]

Formats the value using the given formatter. Read more

impl Error for Error
[src]

This method is soft-deprecated. Read more

The lower-level cause of this error, if any. Read more

impl Display for Error
[src]

Formats the value using the given formatter. Read more

impl From<Error> for Error
[src]

Performs the conversion.

impl From<TypeError> for Error
[src]

Performs the conversion.

impl TryFrom<Error> for TypeError
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

Auto Trait Implementations

impl Send for Error

impl Sync for Error