Struct usb_device::class::ControlIn
source · [−]pub struct ControlIn<'a, 'p, 'r, B: UsbBus> { /* private fields */ }
Expand description
Handle for a control IN transfer. When implementing a class, use the methods of this object to response to the transfer with either data or an error (STALL condition). To ignore the request and pass it on to the next class, simply don’t call any method.
Implementations
sourceimpl<'a, 'p, 'r, B: UsbBus> ControlIn<'a, 'p, 'r, B>
impl<'a, 'p, 'r, B: UsbBus> ControlIn<'a, 'p, 'r, B>
sourcepub fn accept_with(self, data: &[u8]) -> Result<()>
pub fn accept_with(self, data: &[u8]) -> Result<()>
Accepts the transfer with the supplied buffer.
sourcepub fn accept_with_static(self, data: &'static [u8]) -> Result<()>
pub fn accept_with_static(self, data: &'static [u8]) -> Result<()>
Accepts the transfer with the supplied static buffer. This method is useful when you have a large static descriptor to send as one packet.
Auto Trait Implementations
impl<'a, 'p, 'r, B> RefUnwindSafe for ControlIn<'a, 'p, 'r, B>
impl<'a, 'p, 'r, B> Send for ControlIn<'a, 'p, 'r, B>
impl<'a, 'p, 'r, B> Sync for ControlIn<'a, 'p, 'r, B>
impl<'a, 'p, 'r, B> Unpin for ControlIn<'a, 'p, 'r, B>where
'a: 'p,
impl<'a, 'p, 'r, B> !UnwindSafe for ControlIn<'a, 'p, 'r, B>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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