pub trait AsyncReader: Send {
// Required methods
fn read<'a, 'async_trait>(
&'a mut self,
buf: &'a mut [u8],
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: 'async_trait,
'a: 'async_trait;
fn read_exact<'a, 'async_trait>(
&'a mut self,
buf: &'a mut [u8],
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: 'async_trait,
'a: 'async_trait;
}Required Methods§
fn read<'a, 'async_trait>(
&'a mut self,
buf: &'a mut [u8],
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
fn read_exact<'a, 'async_trait>(
&'a mut self,
buf: &'a mut [u8],
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".