pub struct Limits {
pub max_archive_size: u64,
pub max_entry_uncompressed_size: u64,
pub max_total_uncompressed_size: u64,
pub max_entries: usize,
pub max_compression_ratio: f64,
}Expand description
Safety guardrails for archive size and expansion limits.
Fields§
§max_archive_size: u64§max_entry_uncompressed_size: u64§max_total_uncompressed_size: u64§max_entries: usize§max_compression_ratio: f64Implementations§
Source§impl Limits
impl Limits
pub fn from_toml(raw: &str) -> Result<Self, OpenPackError>
pub fn from_toml_file(path: &Path) -> Result<Self, OpenPackError>
pub fn builtin() -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Limits
impl<'de> Deserialize<'de> for Limits
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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