Skip to main content

AsyncReadExt

Trait AsyncReadExt 

Source
pub trait AsyncReadExt: AsyncRead {
    // Provided methods
    fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self> ⓘ
       where Self: Unpin { ... }
    fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self> ⓘ
       where Self: Unpin { ... }
}
Expand description

Extension methods for types implementing AsyncRead.

Provided Methods§

Source

fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self> ⓘ
where Self: Unpin,

Read some bytes asynchronously from the reader.

Source

fn read_exact<'a>(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self> ⓘ
where Self: Unpin,

Read exactly enough bytes to fill the provided buffer.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<R> AsyncReadExt for R
where R: AsyncRead + ?Sized,