Struct usb_device::control::Request

source ·
pub struct Request {
    pub direction: UsbDirection,
    pub request_type: RequestType,
    pub recipient: Recipient,
    pub request: u8,
    pub value: u16,
    pub index: u16,
    pub length: u16,
}
Expand description

A control request read from a SETUP packet.

Fields

direction: UsbDirection

Direction of the request.

request_type: RequestType

Type of the request.

recipient: Recipient

Recipient of the request.

request: u8

Request code. The meaning of the value depends on the previous fields.

value: u16

Request value. The meaning of the value depends on the previous fields.

index: u16

Request index. The meaning of the value depends on the previous fields.

length: u16

Length of the DATA stage. For control OUT transfers this is the exact length of the data the host sent. For control IN transfers this is the maximum length of data the device should return.

Implementations

Standard USB control request Get Status

Standard USB control request Clear Feature

Standard USB control request Set Feature

Standard USB control request Set Address

Standard USB control request Get Descriptor

Standard USB control request Set Descriptor

Standard USB control request Get Configuration

Standard USB control request Set Configuration

Standard USB control request Get Interface

Standard USB control request Set Interface

Standard USB control request Synch Frame

Standard USB feature Endpoint Halt for Set/Clear Feature

Standard USB feature Device Remote Wakeup for Set/Clear Feature

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. 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.

Should always be Self
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.