Function bdrck::io::read_at_most[][src]

pub fn read_at_most<R: Read>(r: &mut R, maximum_bytes: usize) -> Result<Vec<u8>>

A convenience wrapper around read_at_most_into, which allocates its own buffer.

This is most useful when you, for example, would normally want read_to_end, but with an upper bound on how many bytes you're willing to read.