Skip to main content

limited_reader

Function limited_reader 

Source
fn limited_reader(
    bytes: &[u8],
    budget: u64,
) -> Result<ImageReader<Cursor<&[u8]>>>
Expand description

Creates an image reader with the configured allocation limit.

The reader is returned before decoding so the caller controls when source allocation begins.