Trait completion::io::AsyncReadWith[][src]

pub trait AsyncReadWith<'a> {
    type ReadFuture: CompletionFuture;
    pub fn read(&'a mut self, buf: ReadBufMut<'a>) -> Self::ReadFuture;
}
This is supported on crate feature std only.

Read bytes from a source asynchronously with a specific lifetime.

Associated Types

type ReadFuture: CompletionFuture[src]

The future that reads from the source.

Loading content...

Required methods

pub fn read(&'a mut self, buf: ReadBufMut<'a>) -> Self::ReadFuture[src]

Pull some bytes from this source into the specified buffer.

If this reads 0 bytes of data, either the buffer was 0 bytes in length or the stream has reached EOF.

Loading content...

Implementations on Foreign Types

impl<'a, 's> AsyncReadWith<'a> for &'s [u8][src]

type ReadFuture = ReadSlice<'a, 's>

impl<'a, T> AsyncReadWith<'a> for Cursor<T> where
    T: AsRef<[u8]>, 
[src]

type ReadFuture = ReadCursor<'a, T>

impl<'a> AsyncReadWith<'a> for Empty[src]

type ReadFuture = Ready<Result<(), Error>>

impl<'a, '_, R> AsyncReadWith<'a> for &'_ mut R where
    R: AsyncReadWith<'a> + ?Sized
[src]

type ReadFuture = <R as AsyncReadWith<'a>>::ReadFuture

impl<'a, R> AsyncReadWith<'a> for Box<R, Global> where
    R: AsyncReadWith<'a> + ?Sized
[src]

type ReadFuture = <R as AsyncReadWith<'a>>::ReadFuture

impl<'a> AsyncReadWith<'a> for Repeat[src]

type ReadFuture = ReadRepeat<'a>

Loading content...

Implementors

impl<'a, R: AsyncBufRead> AsyncReadWith<'a> for TakeUntil<R>[src]

type ReadFuture = ReadTakeUntil<'a, R>

impl<'a, R: AsyncRead> AsyncReadWith<'a> for BufReader<R>[src]

type ReadFuture = ReadBufReader<'a, R>

impl<'a, T: AsyncRead> AsyncReadWith<'a> for Take<T>[src]

type ReadFuture = ReadTake<'a, T>

impl<'a, T: AsyncRead, U: AsyncRead + 'static> AsyncReadWith<'a> for Chain<T, U>[src]

type ReadFuture = ReadChain<'a, T, U>

impl<'a, W: AsyncReadWith<'a>> AsyncReadWith<'a> for BufWriter<W>[src]

type ReadFuture = W::ReadFuture

Loading content...