embassy-usb-driver

Crates

git

Versions

default

Flavors

embassy_usb_driver

Trait EndpointOut

Source
pub trait EndpointOut: Endpoint {
    // Required method
    async fn read(&mut self, buf: &mut [u8]) -> Result<usize, EndpointError>;
}
Expand description

OUT Endpoint trait.

Required Methods§

Source

async fn read(&mut self, buf: &mut [u8]) -> Result<usize, EndpointError>

Read a single packet of data from the endpoint, and return the actual length of the packet.

This should also clear any NAK flags and prepare the endpoint to receive the next packet.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§