pub fn read_exact_to_bytes<'a, T: AsyncRead + ?Sized + Unpin>(
    reader: &'a mut T,
    bytes: &'a mut BytesMut,
    nread: usize
) -> ReadExactToBytesFuture<'a, T>Notable traits for ReadExactToBytesFuture<'_, T>impl<T: AsyncRead + ?Sized + Unpin> Future for ReadExactToBytesFuture<'_, T> type Output = Result<()>;
Available on crate feature read-exact-to-bytes only.
Expand description
  • nread - bytes to read in

Return 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.