Trait ReadSimple
Source pub trait ReadSimple {
type Error: Debug;
// Required method
fn read_simple(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>;
}
Expand description
A simple read trait suitable for embedded devices.
The error type used by this reader.
Read up to buf.len()
bytes into the given buffer,
returning the exact number of bytes read.
The caller makes no guarantees about the contents of buf
.
In the case of an error, the contents of buf
are undefined.