pub fn read_exact_to_bytes<'a, R: AsyncRead + ?Sized + Unpin>(
    reader: &'a mut R,
    bytes: &'a mut BytesMut,
    nread: usize
) -> ReadExactToBytesFuture<'a, R> 
Available on crate feature bytes only.
Expand description
  • nread - bytes to read in

Return std::io::ErrorKind::UnexpectedEof on Eof.

NOTE that this function does not modify any existing data.

Cancel safety

It is cancel safe and dropping the returned future will not stop the wakeup from happening.