Trait completion_io::AsyncReadWith[][src]

pub trait AsyncReadWith<'a> {
    type ReadFuture: CompletionFuture<Output = Result<()>>;
    fn read(&'a mut self, buf: ReadBufMut<'a>) -> Self::ReadFuture;
}

Read bytes from a source asynchronously with a specific lifetime.

Associated Types

type ReadFuture: CompletionFuture<Output = Result<()>>[src]

The future that reads from the source.

Loading content...

Required methods

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, R: AsyncReadWith<'a> + ?Sized> AsyncReadWith<'a> for &mut R[src]

type ReadFuture = R::ReadFuture

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

type ReadFuture = R::ReadFuture

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

type ReadFuture = Ready<Result<()>>

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

type ReadFuture = ReadRepeat<'a>

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

type ReadFuture = ReadSlice<'a, 's>

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

type ReadFuture = ReadCursor<'a, T>

Loading content...

Implementors

Loading content...