[−][src]Struct usb_device::class::ControlOut
Handle for a control OUT transfer. When implementing a class, use the methods of this object to response to the transfer with an ACT 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, 'r, B: UsbBus> ControlOut<'a, 'p, 'r, B>
[src]
pub fn request(&self) -> &Request
[src]
Gets the request from the SETUP packet.
pub fn data(&self) -> &[u8]
[src]
Gets the data from the data stage of the request. May be empty if there was no data stage.
pub fn accept(self) -> Result<()>
[src]
Accepts the transfer by succesfully responding to the status stage.
pub fn reject(self) -> Result<()>
[src]
Rejects the transfer by stalling the pipe.
Auto Trait Implementations
impl<'a, 'p, 'r, B> Unpin for ControlOut<'a, 'p, 'r, B> where
'a: 'p,
'a: 'p,
impl<'a, 'p, 'r, B> Send for ControlOut<'a, 'p, 'r, B>
impl<'a, 'p, 'r, B> Sync for ControlOut<'a, 'p, 'r, B>
Blanket Implementations
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,