pub enum Error {
    InvalidState {
        got: State,
        expected: State,
    },
    BufferTooBig {
        got: usize,
        expected: usize,
    },
    MaximumTransferSizeExceeded,
    EraseLimitReached,
    MaximumChunksExceeded,
    NoSpaceLeft,
    UnrecognizedStatusCode(u8),
    UnrecognizedStateCode(u8),
    ResponseTooShort {
        got: usize,
        expected: usize,
    },
    StatusError(Status),
    StateError(State),
}

Variants

InvalidState

Fields

got: State
expected: State

The device is in an invalid state (got: {got:?}, expected: {expected:?}).

BufferTooBig

Fields

got: usize
expected: usize

Buffer size exceeds the maximum allowed.

MaximumTransferSizeExceeded

Maximum transfer size exceeded.

EraseLimitReached

Erasing limit reached.

MaximumChunksExceeded

Maximum number of chunks exceeded.

NoSpaceLeft

Not enough space on device.

UnrecognizedStatusCode(u8)

Unrecognized status code: {0}

UnrecognizedStateCode(u8)

Unrecognized state code: {0}

ResponseTooShort

Fields

got: usize
expected: usize

Device response is too short (got: {got:?}, expected: {expected:?}).

StatusError(Status)

Device status is in error: {0}

StateError(State)

Device state is in error: {0}

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

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

Performs the conversion.

Performs the conversion.

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.