pub struct PackageLimits {
pub entries: usize,
pub bytes: u64,
}Expand description
How much of a package read_package_within may read: how many
entries, directories aside, and how many bytes they inflate to in all.
Both are checked against the central directory before any entry is inflated. The sizes it gives are the ones each entry is then held to exactly, so a package within its limits never holds more.
Fields§
§entries: usizeThe most entries the package may have.
bytes: u64The most bytes its entries may inflate to, together.
Implementations§
Source§impl PackageLimits
impl PackageLimits
Sourcepub const NONE: Self
pub const NONE: Self
No limit past the archive’s own: entries may not overlap, so a package expands at most as far as its own bytes deflate from, about a thousand times its size.
Sourcepub const DEFAULT: Self
pub const DEFAULT: Self
4096 entries and 4 GiB in all, what read_package holds a package
to. The packages in the corpus have at most 4 entries and inflate to
at most 315 457 bytes; these limits are a thousand times the one and
over thirteen thousand times the other.
Trait Implementations§
Source§impl Clone for PackageLimits
impl Clone for PackageLimits
impl Copy for PackageLimits
Source§impl Debug for PackageLimits
impl Debug for PackageLimits
impl Eq for PackageLimits
Source§impl PartialEq for PackageLimits
impl PartialEq for PackageLimits
impl StructuralPartialEq for PackageLimits
Auto Trait Implementations§
impl Freeze for PackageLimits
impl RefUnwindSafe for PackageLimits
impl Send for PackageLimits
impl Sync for PackageLimits
impl Unpin for PackageLimits
impl UnsafeUnpin for PackageLimits
impl UnwindSafe for PackageLimits
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> Scalar for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.