pub trait UartIo {
type Error;
// Required methods
fn read(&mut self, buf: &mut [u8]) -> UartIoResult<usize, Self::Error>;
fn write_all(&mut self, bytes: &[u8]) -> UartIoResult<(), Self::Error>;
}Expand description
Minimal UART byte-stream trait for MCU/no-std backends.
Implement this trait for a board UART, DMA ring, RTOS queue, or test double.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".