pub trait Stream: Send {
    fn write(&self, data: &[u8]) -> UartResult<()>;
    fn read(&self, len: usize, timeout: Duration) -> UartResult<Vec<u8>>;
}
Expand description

This trait is used to represent streams and allows for mocking for api unit tests

Required Methods

Write raw bytes to stream

Read upto a specified amount of raw bytes from the stream

Implementors