#[repr(C)]pub struct ControlSetup {
pub request_type: u8,
pub request: u8,
pub value: u16,
pub index: u16,
pub len: u16,
}Expand description
Any Serialization or deserialization of this struct should be careful to make sure the u16s
are in Little Endian for the wire and Host Endian at all other times.
Fields§
§request_type: u8§request: u8§value: u16§index: u16§len: u16Implementations§
Source§impl ControlSetup
impl ControlSetup
pub const SIZE: usize
Sourcepub fn serialize(self, buf: &mut [u8])
pub fn serialize(self, buf: &mut [u8])
Taste Host-Endian ControlSetup and serializes it in Little-Endian
pub fn deserialize(buf: &[u8]) -> ControlSetup
Trait Implementations§
Source§impl Clone for ControlSetup
impl Clone for ControlSetup
Source§fn clone(&self) -> ControlSetup
fn clone(&self) -> ControlSetup
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ControlSetup
Auto Trait Implementations§
impl Freeze for ControlSetup
impl RefUnwindSafe for ControlSetup
impl Send for ControlSetup
impl Sync for ControlSetup
impl Unpin for ControlSetup
impl UnsafeUnpin for ControlSetup
impl UnwindSafe for ControlSetup
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