Enum usb_device::UsbDirection
source · [−]#[repr(u8)]
pub enum UsbDirection {
Out,
In,
}
Expand description
Direction of USB traffic. Note that in the USB standard the direction is always indicated from the perspective of the host, which is backward for devices, but the standard directions are used for consistency.
The values of the enum also match the direction bit used in endpoint addresses and control request types.
Variants
Out
Host to device (OUT)
In
Device to host (IN)
Trait Implementations
sourceimpl Clone for UsbDirection
impl Clone for UsbDirection
sourcefn clone(&self) -> UsbDirection
fn clone(&self) -> UsbDirection
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for UsbDirection
impl Debug for UsbDirection
sourceimpl From<u8> for UsbDirection
impl From<u8> for UsbDirection
sourceimpl PartialEq<UsbDirection> for UsbDirection
impl PartialEq<UsbDirection> for UsbDirection
sourcefn eq(&self, other: &UsbDirection) -> bool
fn eq(&self, other: &UsbDirection) -> bool
impl Copy for UsbDirection
impl Eq for UsbDirection
impl StructuralEq for UsbDirection
impl StructuralPartialEq for UsbDirection
Auto Trait Implementations
impl RefUnwindSafe for UsbDirection
impl Send for UsbDirection
impl Sync for UsbDirection
impl Unpin for UsbDirection
impl UnwindSafe for UsbDirection
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