pub fn read_up_to(reader: &mut impl Read, buf: &mut [u8]) -> Result<usize>Expand description
Reads from reader until buf is full or EOF; returns the bytes read.
Unlike a bare read call this only returns short on EOF, which the
streaming loops rely on to spot the final chunk.