#[non_exhaustive]pub struct ExtractionOptions {
pub atomic: bool,
pub skip_duplicates: bool,
}Expand description
Options controlling extraction behavior (non-security).
Separate from SecurityConfig to keep security settings focused.
These options control operational behavior like atomicity.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.atomic: boolExtract atomically: use a temp dir in the same parent as the output directory, rename on success, and delete on failure.
When enabled, extraction is all-or-nothing: if extraction fails, the output directory will not be created. This prevents partial extraction artifacts from remaining on disk.
Note: cleanup is best-effort if the process is terminated via SIGKILL.
skip_duplicates: boolSkip duplicate entries silently instead of aborting.
When true (default), if an archive contains two entries with the same
destination path, the second entry is skipped and a warning is recorded
in ExtractionReport. When false, duplicate entries cause an error.
Implementations§
Source§impl ExtractionOptions
impl ExtractionOptions
Sourcepub fn with_atomic(self, atomic: bool) -> Self
pub fn with_atomic(self, atomic: bool) -> Self
Enables or disables atomic extraction.
When enabled, extraction is all-or-nothing: the output directory is not created if extraction fails.
§Examples
use exarch_core::ExtractionOptions;
let opts = ExtractionOptions::default().with_atomic(true);
assert!(opts.atomic);Sourcepub fn with_skip_duplicates(self, skip: bool) -> Self
pub fn with_skip_duplicates(self, skip: bool) -> Self
Enables or disables skipping duplicate entries silently.
§Examples
use exarch_core::ExtractionOptions;
let opts = ExtractionOptions::default().with_skip_duplicates(false);
assert!(!opts.skip_duplicates);Trait Implementations§
Source§impl Clone for ExtractionOptions
impl Clone for ExtractionOptions
Source§fn clone(&self) -> ExtractionOptions
fn clone(&self) -> ExtractionOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more