pub fn read_to_container_rng<'a, C, Reader>(
    reader: &'a mut Reader,
    container: &'a mut C,
    rng: impl RangeBounds<usize>
) -> ReadToContainerRngFuture<'a, C, Reader> where
    C: Container + ?Sized,
    Reader: AsyncRead + ?Sized + Unpin,
Expand description
  • rng - The start of the range specify the minimum of bytes to read in, while the end of the range specify the maximum of bytes that can be read in. If the lower bound is not specified, it is default to 0. If the upper bound is not specified, it is default to the capacity of bytes. The lower bound must not be larger than the upper bound.

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.