Trait async_io_traits::io::Read

source ·
pub trait Read {
    fn read(&mut self, buf: &mut [u8]) -> impl Future<Output = Result<usize>>;
    fn as_ready(&mut self) -> Option<&mut impl ReadyRead>;
    fn as_owned(&mut self) -> Option<&mut impl OwnedRead>;

    async fn read_vectored(
        &mut self,
        bufs: &mut [IoSliceMut<'_>]
    ) -> Result<usize> { ... } async fn read_buf(&mut self, buf: &mut BorrowedCursor<'_>) -> Result<()> { ... } async fn read_exact(&mut self, buf: &mut [u8]) -> Result<()> { ... } async fn read_buf_exact(
        &mut self,
        buf: &mut BorrowedCursor<'_>
    ) -> Result<()> { ... } async fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize> { ... } async fn read_to_string(&mut self, buf: &mut String) -> Result<usize> { ... } fn is_read_vectored(&self) -> bool { ... } fn by_ref(&mut self) -> &mut Self
    where
        Self: Sized
, { ... } }
Expand description

A simple async-ification of sync Read plus downcasting methods.

Required Methods

Provided Methods

Implementors