[−][src]Trait futures_util::io::AsyncReadExt  
An extension trait which adds utility methods to AsyncRead types.
Provided Methods
fn copy_into<W>(self, writer: W) -> CopyInto<Self, W> where
    W: AsyncWrite,
    Self: Sized, 
W: AsyncWrite,
Self: Sized,
Creates a future which copies all the bytes from one object to another.
The returned future will copy all the bytes read from this AsyncRead into the
writer specified. This future will only complete once the reader has hit
EOF and all bytes have been written to and flushed from the writer
provided.
On success the number of bytes is returned and this AsyncRead and writer are
consumed. On error the error is returned and the I/O objects are consumed as
well.
fn read<T>(self, buf: T) -> Read<Self, T> where
    T: AsMut<[u8]>,
    Self: Sized, 
T: AsMut<[u8]>,
Self: Sized,
Tries to read some bytes directly into the given buf in asynchronous
manner, returning a future type.
The returned future will resolve to both the I/O stream and the buffer as well as the number of bytes read once the read operation is completed.
fn read_exact<T>(self, buf: T) -> ReadExact<Self, T> where
    T: AsMut<[u8]>,
    Self: Sized, 
T: AsMut<[u8]>,
Self: Sized,
Creates a future which will read exactly enough bytes to fill buf,
returning an error if EOF is hit sooner.
The returned future will resolve to both the I/O stream as well as the buffer once the read operation is completed.
In the case of an error the buffer and the object will be discarded, with the error yielded. In the case of success the object will be destroyed and the buffer will be returned, with all data read from the stream appended to the buffer.
fn read_to_end(self, buf: Vec<u8>) -> ReadToEnd<Self> where
    Self: Sized, 
Self: Sized,
Creates a future which will read all the bytes from this AsyncRead.
In the case of an error the buffer and the object will be discarded, with the error yielded. In the case of success the object will be destroyed and the buffer will be returned, with all data read from the stream appended to the buffer.
fn split(self) -> (ReadHalf<Self>, WriteHalf<Self>) where
    Self: AsyncWrite + Sized, 
Self: AsyncWrite + Sized,
Helper method for splitting this read/write object into two halves.
The two halves returned implement the Read and Write traits,
respectively.
Implementors
impl<T: AsyncRead + ?Sized> AsyncReadExt for T[src] 
impl<T: AsyncRead + ?Sized> AsyncReadExt for Tfn copy_into<W>(self, writer: W) -> CopyInto<Self, W> where
    W: AsyncWrite,
    Self: Sized, [src] 
fn copy_into<W>(self, writer: W) -> CopyInto<Self, W> where
    W: AsyncWrite,
    Self: Sized, fn read<T>(self, buf: T) -> Read<Self, T> where
    T: AsMut<[u8]>,
    Self: Sized, [src] 
fn read<T>(self, buf: T) -> Read<Self, T> where
    T: AsMut<[u8]>,
    Self: Sized, fn read_exact<T>(self, buf: T) -> ReadExact<Self, T> where
    T: AsMut<[u8]>,
    Self: Sized, [src] 
fn read_exact<T>(self, buf: T) -> ReadExact<Self, T> where
    T: AsMut<[u8]>,
    Self: Sized, fn read_to_end(self, buf: Vec<u8>) -> ReadToEnd<Self> where
    Self: Sized, [src] 
fn read_to_end(self, buf: Vec<u8>) -> ReadToEnd<Self> where
    Self: Sized, fn split(self) -> (ReadHalf<Self>, WriteHalf<Self>) where
    Self: AsyncWrite + Sized, [src] 
fn split(self) -> (ReadHalf<Self>, WriteHalf<Self>) where
    Self: AsyncWrite + Sized,