Trait AsyncBufRead

Source
pub trait AsyncBufRead: AsyncReadRent {
    // Required methods
    fn fill_buf(&mut self) -> impl Future<Output = Result<&[u8]>>;
    fn consume(&mut self, amt: usize);
}
Expand description

AsyncBufRead: async read with buffered content

Required Methods§

Source

fn fill_buf(&mut self) -> impl Future<Output = Result<&[u8]>>

Try read data and get a reference to the internal buffer

Source

fn consume(&mut self, amt: usize)

Mark how much data is read

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§