Skip to main content

SerialRead

Trait SerialRead 

Source
pub trait SerialRead {
    // Required method
    async fn serial_read(&mut self) -> Result<Vec<u8>>;
}
Expand description

Asynchronous byte reader abstraction over a target serial device.

Required Methods§

Source

async fn serial_read(&mut self) -> Result<Vec<u8>>

Reads the next chunk of raw bytes from the serial device.

Returns an empty Vec on EOF.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl SerialRead for DeviceProxy

Source§

async fn serial_read(&mut self) -> Result<Vec<u8>>

Implementors§