Struct usbip::SetupPacket
source · [−]pub struct SetupPacket {
pub request_type: u8,
pub request: u8,
pub value: u16,
pub index: u16,
pub length: u16,
}
Expand description
Parse the SETUP packet of control transfers
Fields
request_type: u8
bmRequestType
request: u8
bRequest
value: u16
wValue
index: u16
wIndex
length: u16
wLength
Implementations
sourceimpl SetupPacket
impl SetupPacket
sourcepub fn parse(setup: &[u8; 8]) -> SetupPacket
pub fn parse(setup: &[u8; 8]) -> SetupPacket
Parse a SetupPacket from raw setup packet
Trait Implementations
sourceimpl Clone for SetupPacket
impl Clone for SetupPacket
sourcefn clone(&self) -> SetupPacket
fn clone(&self) -> SetupPacket
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SetupPacket
impl Debug for SetupPacket
sourceimpl Default for SetupPacket
impl Default for SetupPacket
sourcefn default() -> SetupPacket
fn default() -> SetupPacket
Returns the “default value” for a type. Read more
impl Copy for SetupPacket
Auto Trait Implementations
impl RefUnwindSafe for SetupPacket
impl Send for SetupPacket
impl Sync for SetupPacket
impl Unpin for SetupPacket
impl UnwindSafe for SetupPacket
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more