Function tokio_ioext::read_n [] [src]

pub fn read_n<A, T>(a: A, buf: T, n: usize) -> ReadN<A, T> where
    A: AsyncRead,
    T: AsMut<[u8]>, 

Creates a future which will read exactly n bytes into buf.

The returned future will resolve to the I/O stream and 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.