Struct capsules_extra::usb::descriptors::SetupData
source · pub struct SetupData {
pub request_type: DeviceRequestType,
pub request_code: u8,
pub value: u16,
pub index: u16,
pub length: u16,
}
Expand description
The data structure sent in a SETUP handshake.
Fields§
§request_type: DeviceRequestType
§request_code: u8
§value: u16
§index: u16
§length: u16
Implementations§
source§impl SetupData
impl SetupData
sourcepub fn get(p: &[VolatileCell<u8>]) -> Option<Self>
pub fn get(p: &[VolatileCell<u8>]) -> Option<Self>
Create a SetupData
structure from a packet received from the wire
sourcepub fn get_standard_request(&self) -> Option<StandardRequest>
pub fn get_standard_request(&self) -> Option<StandardRequest>
If the SetupData
represents a standard device request, return it
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SetupData
impl RefUnwindSafe for SetupData
impl Send for SetupData
impl Sync for SetupData
impl Unpin for SetupData
impl UnwindSafe for SetupData
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)