pub fn read_exact_or_eof<'a, A>(
reader: &'a mut A,
buf: &'a mut [u8]
) -> ReadExactOrEof<'a, A>ⓘNotable traits for ReadExactOrEof<'_, A>
impl<A> Future for ReadExactOrEof<'_, A> wherewhere
A: AsyncRead + Unpin, type Output = Result<usize>;
Creates a future which will read exactly enough bytes to fill
EOF is reached first. If a short read should be considered an error, use
The returned future will resolve to the number of bytes read.
In the case of an error the contents of the buffer are unspecified.