pub trait Read {
type Error;
// Required method
fn read(&mut self) -> Result<Option<u8>, Self::Error>;
}
Expand description
The error which can happen during a read operation.
Use Void when no error can be emitted.
Read a byte.
Return Ok(None)
in case of eof.
Please be aware that even after reading an eof it may be tried again
(which then also has to result in an eof).