pub struct ExtractorConfig {
pub max_file_size: u64,
pub max_total_size: u64,
pub max_path_length: usize,
pub max_entries: usize,
pub allow_symlinks: bool,
pub allow_absolute_paths: bool,
pub set_executable: bool,
pub overwrite: bool,
}Expand description
Extraction configuration options
Fields§
§max_file_size: u64Maximum single file size in bytes
max_total_size: u64Maximum total extracted size in bytes
max_path_length: usizeMaximum path length
max_entries: usizeMaximum number of entries
allow_symlinks: boolAllow symlinks (dangerous if from untrusted sources)
allow_absolute_paths: boolAllow absolute paths (usually dangerous)
set_executable: boolSet executable permissions on .so/.dll/.dylib files
overwrite: boolOverwrite existing files
Implementations§
Source§impl ExtractorConfig
impl ExtractorConfig
Sourcepub fn permissive() -> Self
pub fn permissive() -> Self
Create a permissive config for trusted sources
Trait Implementations§
Source§impl Clone for ExtractorConfig
impl Clone for ExtractorConfig
Source§fn clone(&self) -> ExtractorConfig
fn clone(&self) -> ExtractorConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExtractorConfig
impl Debug for ExtractorConfig
Auto Trait Implementations§
impl Freeze for ExtractorConfig
impl RefUnwindSafe for ExtractorConfig
impl Send for ExtractorConfig
impl Sync for ExtractorConfig
impl Unpin for ExtractorConfig
impl UnsafeUnpin for ExtractorConfig
impl UnwindSafe for ExtractorConfig
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