pub struct ControlIn<'a, B: UsbBus> { /* private fields */ }Expand description
Handle for a pending control IN transfer.
Passed to UsbClass::control_in.
Call one of the accept_* methods or reject to respond; dropping without
calling either passes the request to the next handler.
Implementations§
Source§impl<'a, B: UsbBus> ControlIn<'a, B>
impl<'a, B: UsbBus> ControlIn<'a, B>
Sourcepub fn accept(
self,
f: impl FnOnce(&mut [u8]) -> UsbResult<usize>,
) -> UsbResult<()>
pub fn accept( self, f: impl FnOnce(&mut [u8]) -> UsbResult<usize>, ) -> UsbResult<()>
Accept with data written by a closure into the pipe buffer.
Sourcepub fn accept_with(self, data: &[u8]) -> UsbResult<()>
pub fn accept_with(self, data: &[u8]) -> UsbResult<()>
Accept with a pre-built data slice.
Sourcepub fn accept_with_static(self, data: &'static [u8]) -> UsbResult<()>
pub fn accept_with_static(self, data: &'static [u8]) -> UsbResult<()>
Accept with a 'static slice (avoids copy for large descriptors).
Auto Trait Implementations§
impl<'a, B> !UnwindSafe for ControlIn<'a, B>
impl<'a, B> Forget for ControlIn<'a, B>
impl<'a, B> Freeze for ControlIn<'a, B>
impl<'a, B> Move for ControlIn<'a, B>
impl<'a, B> RefUnwindSafe for ControlIn<'a, B>where
&'a B: RefUnwindSafe,
impl<'a, B> Send for ControlIn<'a, B>
impl<'a, B> Sync for ControlIn<'a, B>
impl<'a, B> Unpin for ControlIn<'a, B>
impl<'a, B> UnsafeUnpin for ControlIn<'a, B>where
&'a B: UnsafeUnpin,
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