pub trait Read {
// Required method
fn read(&mut self, buf: &mut [u8]) -> Result<(), Error>;
// Provided methods
fn read_all_blocking(&mut self, buf: &mut [u8]) -> Result<(), Error> { ... }
fn read_all<'life0, 'life1, 'async_trait>(
&'life0 mut self,
buf: &'life1 mut [u8],
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: Send + 'async_trait { ... }
}
Required Methods§
Provided Methods§
Sourcefn read_all_blocking(&mut self, buf: &mut [u8]) -> Result<(), Error>
fn read_all_blocking(&mut self, buf: &mut [u8]) -> Result<(), Error>
Read data from the device, blocking until all bytes are read