pub struct PackReadLimits {
pub max_delta_depth: usize,
pub max_materialized_bytes: usize,
pub max_cached_bytes: usize,
}Expand description
Hard limits applied while reading packs.
Whole-pack readers use Self::max_delta_depth. Targeted reads through a
BoundedPackDecoder additionally enforce the materialization and cache
limits.
Fields§
§max_delta_depth: usizeMaximum number of delta entries between a target and its base.
max_materialized_bytes: usizeMaximum logical decoded object and delta bytes owned or actively used by
the decoder at one time. The bound is checked before allocation. Allocator
slack/capacity, collection metadata, and fixed-size I/O scratch buffers
are not included, so this is deliberately not an RSS or heap-usage bound.
A resolved immutable REF base is counted once while active even when its
Arc is also retained by its outcome or lookup table; the decoder reuses
that allocation rather than copying it. Returned objects cease to count
after the call unless cached.
max_cached_bytes: usizeMaximum logical decoded body bytes retained between calls. The effective
cache ceiling is also capped by max_materialized_bytes.