embassy-usb-logger

Crates

git

Versions

default

Flavors

Skip to main content

ReceiverHandler

Trait ReceiverHandler 

Source
pub trait ReceiverHandler {
    // Required methods
    fn handle_data(&self, data: &[u8]) -> impl Future<Output = ()> + Send;
    fn new() -> Self;
}
Expand description

A trait that can be implemented and then passed to the

Required Methods§

Source

fn handle_data(&self, data: &[u8]) -> impl Future<Output = ()> + Send

Data comes in from the serial port with each command and runs this function

Source

fn new() -> Self

Create a new instance of the Handler

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§