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