pub struct ControlShared { /* private fields */ }Expand description
Shared state between the USB control handler and MtpClass.
Implementations§
Sourcepub fn set_device_status(&self, status: u16)
pub fn set_device_status(&self, status: u16)
Sets the status code returned to the host by REQ_GET_DEVICE_STATUS (0x67).
Sourcepub fn device_status(&self) -> u16
pub fn device_status(&self) -> u16
Returns the current device status code.
Sourcepub fn take_cancel(&self) -> Option<u32>
pub fn take_cancel(&self) -> Option<u32>
Returns and clears the cancelled transaction ID if the host sent REQ_CANCEL (0x64).
Sourcepub fn take_reset(&self) -> bool
pub fn take_reset(&self) -> bool
Returns and clears whether the host sent REQ_RESET (0x66).
Trait Implementations§
Auto Trait Implementations§
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