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§
Source§impl<'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> !UnwindSafe for ControlIn<'a, 'p, 'r, B>
impl<'a, 'p, 'r, B> Freeze for ControlIn<'a, 'p, 'r, B>where
&'p mut ControlPipe<'a, B>: Freeze,
impl<'a, 'p, 'r, B> RefUnwindSafe for ControlIn<'a, 'p, 'r, B>where
&'p mut ControlPipe<'a, B>: RefUnwindSafe,
impl<'a, 'p, 'r, B> Send for ControlIn<'a, 'p, 'r, B>where
&'p mut ControlPipe<'a, B>: Send,
impl<'a, 'p, 'r, B> Sync for ControlIn<'a, 'p, 'r, B>where
&'p mut ControlPipe<'a, B>: Sync,
impl<'a, 'p, 'r, B> Unpin for ControlIn<'a, 'p, 'r, B>where
&'p mut ControlPipe<'a, B>: Unpin,
impl<'a, 'p, 'r, B> UnsafeUnpin for ControlIn<'a, 'p, 'r, B>where
&'p mut ControlPipe<'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