[−][src]Struct usb_device::class::ControlIn
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.
Methods
impl<'a, 'p, 'o, B: UsbBus> ControlIn<'a, 'p, 'o, B>
[src]
impl<'a, 'p, 'o, B: UsbBus> ControlIn<'a, 'p, 'o, B>
pub fn request(&self) -> &Request | [src] |
Gets the request from the SETUP packet.
pub fn accept_with(self, data: &[u8]) -> Result<()> | [src] |
Accepts the transfer with the supplied buffer.
pub fn accept( | [src] |
Accepts the transfer with a callback that can write to the internal buffer of the control pipe. Can be used to avoid an extra copy.
pub fn reject(self) -> Result<()> | [src] |
Rejects the transfer by stalling the pipe.
Auto Trait Implementations
impl<'a, 'p, 'o, B> Send for ControlIn<'a, 'p, 'o, B>
impl<'a, 'p, 'o, B> Send for ControlIn<'a, 'p, 'o, B>
impl<'a, 'p, 'o, B> Sync for ControlIn<'a, 'p, 'o, B>
impl<'a, 'p, 'o, B> Sync for ControlIn<'a, 'p, 'o, B>
Blanket Implementations
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |