#[non_exhaustive]pub struct ExtractionReport {
pub files_extracted: usize,
pub directories_created: usize,
pub symlinks_created: usize,
pub bytes_written: u64,
pub duration: Duration,
pub skipped: Skips,
pub warnings: Vec<ExtractionWarning>,
}Expand description
Report of an archive extraction operation.
Contains statistics and metadata about the extraction process.
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.files_extracted: usizeNumber of files successfully extracted.
directories_created: usizeNumber of directories created.
symlinks_created: usizeNumber of symlinks created.
bytes_written: u64Total bytes written to disk.
duration: DurationDuration of the extraction operation.
skipped: SkipsEntries left out of the extraction, by reason.
warnings: Vec<ExtractionWarning>Conditions worth surfacing that are not skipped entries.
Implementations§
Source§impl ExtractionReport
impl ExtractionReport
Sourcepub fn add_warning(&mut self, warning: ExtractionWarning)
pub fn add_warning(&mut self, warning: ExtractionWarning)
Adds a warning to the report.
Sourcepub fn files_skipped(&self) -> usize
pub fn files_skipped(&self) -> usize
Returns how many entries were skipped, over all reasons.
Sourcepub fn total_items(&self) -> usize
pub fn total_items(&self) -> usize
Returns the total number of items actually written to disk
(files_extracted + directories_created + symlinks_created).
This deliberately excludes files_skipped: a
report can carry meaningful progress — skipped entries, warnings —
while this is 0. Callers deciding whether a report is worth
surfacing (e.g. ArchiveError::partial_or) must check
files_skipped/has_warnings too, not rely on
this alone.
Sourcepub fn has_warnings(&self) -> bool
pub fn has_warnings(&self) -> bool
Returns whether any warnings were generated.