Crate better_limit_reader

Source
Expand description

§better-limit-reader

Exposes LimitReader which is a limit reader, that protects against zip-bombs and other nefarious activities.

This crate is heavily inspired by Jon Gjengset’s “Crust of Rust” episode on the inner workings of git on YouTube (https://youtu.be/u0VotuGzD_w?si=oIuV9CITSWHJXKBu&t=3503) and mitigrating Zip-bombs.

Modules§

prelude
Re-exports Traits and macros used by most projects. Add use better_limit_reader::prelude::*; to your code to quickly get started with LimitReader.

Macros§

error_from
Implement provided Error type with a suitable ErrorKind

Structs§

LimitReader
The LimitReader reads into buf which is held within the record struct.
LimitReaderOutput
LimitReader’s output
LimitReaderOutputBuilder
Builder for LimitReaderOutput.

Enums§

LimitReaderOutputBuilderError
Error type for LimitReaderOutputBuilder

Type Aliases§

LimitReaderResult
Default result type for LimitReader