Struct usb_device::control::Request [−][src]
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
impl Request
[src]
pub const GET_STATUS: u8
[src]
Standard USB control request Get Status
pub const CLEAR_FEATURE: u8
[src]
Standard USB control request Clear Feature
pub const SET_FEATURE: u8
[src]
Standard USB control request Set Feature
pub const SET_ADDRESS: u8
[src]
Standard USB control request Set Address
pub const GET_DESCRIPTOR: u8
[src]
Standard USB control request Get Descriptor
pub const SET_DESCRIPTOR: u8
[src]
Standard USB control request Set Descriptor
pub const GET_CONFIGURATION: u8
[src]
Standard USB control request Get Configuration
pub const SET_CONFIGURATION: u8
[src]
Standard USB control request Set Configuration
pub const GET_INTERFACE: u8
[src]
Standard USB control request Get Interface
pub const SET_INTERFACE: u8
[src]
Standard USB control request Set Interface
pub const SYNCH_FRAME: u8
[src]
Standard USB control request Synch Frame
pub const FEATURE_ENDPOINT_HALT: u16
[src]
Standard USB feature Endpoint Halt for Set/Clear Feature
pub const FEATURE_DEVICE_REMOTE_WAKEUP: u16
[src]
Standard USB feature Device Remote Wakeup for Set/Clear Feature
pub fn descriptor_type_index(&self) -> (u8, u8)
[src]
Gets the descriptor type and index from the value field of a GET_DESCRIPTOR request.
Trait Implementations
impl Clone for Request
[src]
fn clone(&self) -> Request
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Request
[src]
impl Debug for Request
[src]
impl Eq for Request
[src]
impl PartialEq<Request> for Request
[src]
impl StructuralEq for Request
[src]
impl StructuralPartialEq for Request
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,