pub trait AsyncRead {
type Error;
// Required method
fn read<'a>(
&'a mut self,
buf: &'a mut [u8],
) -> impl Future<Output = Result<usize, Self::Error>>;
}Expand description
A stream that can be read from asynchronously.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".