Trait compio_io::AsyncBufRead

source ·
pub trait AsyncBufRead: AsyncRead {
    // Required methods
    async fn fill_buf(&mut self) -> Result<&[u8]>;
    fn consume(&mut self, amount: usize);
}
Expand description

§AsyncBufRead

Async read with buffered content.

Required Methods§

source

async fn fill_buf(&mut self) -> Result<&[u8]>

Try fill the internal buffer with data

source

fn consume(&mut self, amount: usize)

Mark how much data is read

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<A: AsyncBufRead + ?Sized> AsyncBufRead for &mut A

source§

async fn fill_buf(&mut self) -> Result<&[u8]>

source§

fn consume(&mut self, amount: usize)

Implementors§