pub enum ErrorKind {
    Read {
        what: String,
    },
    Decode {
        what: String,
    },
    Seek,
    UnknownFileHeaderSize(u8),
    UnsupportedProtocolVersion {
        upper_bound: u8,
        got: u8,
    },
    UnknownBaseType {
        type_id: u8,
    },
    UnknownType {
        type_name: String,
        type_id: usize,
    },
    NotFit,
    UnknownArchitecture(u8),
    UnknownMessage(u16),
    UnknownField(u8),
    MissingDefinition(u8),
}
Expand description

The specific kind of error that can occur.

Variants

Read

Fields

what: String

An error occured while attempting to read bytes.

Decode

Fields

what: String

An error occured while attempting to decode data.

Seek

An error occured while seeking.

UnknownFileHeaderSize(u8)

Encountered a bad file header size.

UnsupportedProtocolVersion

Fields

upper_bound: u8

The highest supported (major) version.

got: u8

The version we got.

Encountered an unsupported protocol version.

UnknownBaseType

Fields

type_id: u8

Encountered an unknown base type identifier.

UnknownType

Fields

type_name: String
type_id: usize

Encountered an unknown type identifier.

NotFit

Bad file magic.

UnknownArchitecture(u8)

Encountered an unknown file architecture.

UnknownMessage(u16)

Encountered an unknown message number.

UnknownField(u8)

Encountered an unknown field definition number.

MissingDefinition(u8)

A data message referenced an unknown definition message.

Trait Implementations

Formats the value using the given formatter. Read more
Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.