pub fn read_up_to(
reader: &mut impl Read,
buf: &mut [u8],
) -> Result<usize, Error>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.