Trait embedded_svc::io::ReadReady
source · pub trait ReadReady: ErrorType {
// Required method
fn read_ready(&mut self) -> Result<bool, Self::Error>;
}
Expand description
Required Methods§
sourcefn read_ready(&mut self) -> Result<bool, Self::Error>
fn read_ready(&mut self) -> Result<bool, Self::Error>
Get whether the reader is ready for immediately reading.
This usually means that there is either some bytes have been received and are buffered and ready to be read, or that the reader is at EOF.
If this returns true
, it’s guaranteed that the next call to Read::read
or BufRead::fill_buf
will not block.