pub struct Limits {
pub max_entry: usize,
pub max_total: usize,
pub max_pixel_bytes: usize,
}Expand description
Decompression budget for one import. Every entry declares its size, which is checked against these limits before anything is allocated, and the decoded length must match it exactly.
Fields§
§max_entry: usizeLargest single entry (doc.dat or one tile).
max_total: usizeTotal bytes extracted over the whole import.
max_pixel_bytes: usizeBytes of decoded pixels one import may hold: every layer’s RGBA together, plus the temporary planes the layer being read decodes through. The entry limits bound what is extracted, not what the layers materialized out of it cost (#4960).
Trait Implementations§
impl Copy for Limits
impl Eq for Limits
impl StructuralPartialEq for Limits
Auto Trait Implementations§
impl Forget for Limits
impl Freeze for Limits
impl Move 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