pub enum UsbError {
    WouldBlock,
    ParseError,
    BufferOverflow,
    EndpointOverflow,
    EndpointMemoryOverflow,
    InvalidEndpoint,
    Unsupported,
    InvalidState,
}
Expand description

A USB stack error.

Variants

WouldBlock

An operation would block because the device is currently busy or there is no data available.

ParseError

Parsing failed due to invalid input.

BufferOverflow

A buffer too short for the data to read was passed, or provided data cannot fit within length constraints.

EndpointOverflow

Classes attempted to allocate more endpoints than the peripheral supports.

EndpointMemoryOverflow

Classes attempted to allocate more packet buffer memory than the peripheral supports. This can be caused by either a single class trying to allocate a packet buffer larger than the peripheral supports per endpoint, or multiple allocated endpoints together using more memory than the peripheral has available for the buffers.

InvalidEndpoint

The endpoint address is invalid or already used.

Unsupported

Operation is not supported by device or configuration.

InvalidState

Operation is not valid in the current state of the object.

Trait Implementations

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

Returns the argument unchanged.

Calls U::from(self).

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

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.