pub struct Limits {
pub decompressed_bytes: u64,
pub compression_ratio: u64,
pub rows_per_category: u64,
pub nesting_depth: u32,
pub dictionary_entries: u32,
}Expand description
Ceilings that turn hostile input into diagnostics rather than exhaustion.
Fields§
§decompressed_bytes: u64Largest accepted size after decompression, in bytes.
Unbounded by default. The ceiling exists to stop a small compressed
input expanding without limit, and that job is done by
Self::compression_ratio, which bounds expansion against the bytes
actually supplied. An absolute ceiling additionally refuses large
uncompressed input, where there is nothing to defend against: the
file is already that size, and reading it cannot multiply it.
A caller who wants an absolute ceiling sets one.
compression_ratio: u64Largest accepted ratio of decompressed to compressed size.
rows_per_category: u64Largest accepted declared row count for one category.
nesting_depth: u32Deepest accepted nesting.
dictionary_entries: u32Largest accepted identifier dictionary.
Implementations§
Trait Implementations§
impl Copy for Limits
impl Eq for Limits
impl StructuralPartialEq for Limits
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more