Skip to main content

AsyncReader

Trait AsyncReader 

Source
pub trait AsyncReader {
    type Error;

    // Required method
    fn read_exact(
        &mut self,
        buf: &mut [u8],
    ) -> impl Future<Output = Result<(), Self::Error>>;
}
Expand description

Async reader trait for reading data from a stream

Required Associated Types§

Required Methods§

Source

fn read_exact( &mut self, buf: &mut [u8], ) -> impl Future<Output = Result<(), Self::Error>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§