pub struct Limits {
pub max_depth: usize,
pub max_output: usize,
pub max_input: usize,
}Expand description
Resource bounds for identify_with_limits — the guard against
decompression bombs and infinitely-nested wrappers on untrusted input.
Fields§
§max_depth: usizeMaximum recursion depth through nested wrappers.
max_output: usizeMaximum bytes to hold from a single decompression/decode step (a decompression bomb is capped here, never allowed to exhaust memory).
max_input: usizeInputs larger than this skip the heuristic decoders (base64/hex/text); magic-signature detection still runs. Bounds worst-case work.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Limits
impl RefUnwindSafe for Limits
impl Send for Limits
impl Sync for Limits
impl Unpin for Limits
impl UnsafeUnpin for Limits
impl UnwindSafe for Limits
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more