Skip to main content

Direction

Trait Direction 

pub trait Direction: Sealed + 'static {
    // Required methods
    fn is_in() -> bool;
    fn is_out() -> bool;
}
Available on crate feature usb only.
Expand description

Marker trait for the transfer direction of a pipe.

Required Methods§

fn is_in() -> bool

Returns true if this direction supports IN (device-to-host) transfers.

fn is_out() -> bool

Returns true if this direction supports OUT (host-to-device) transfers.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

§

impl Direction for In

§

impl Direction for InOut

§

impl Direction for Out