pub struct FileReport {
pub path: String,
pub matches: u64,
pub replacements: u64,
pub bytes_processed: u64,
pub bytes_output: u64,
pub pattern_counts: HashMap<String, u64>,
pub method: String,
pub log_context: Option<LogContextResult>,
pub match_locations: Option<MatchLocationsResult>,
}Expand description
Per-file result details.
Does not contain any original secret values — only counts, byte sizes, pattern labels, and the processing method used.
Fields§
§path: StringFile path (relative or archive entry name).
matches: u64Number of matches found in this file.
replacements: u64Number of replacements applied.
bytes_processed: u64Bytes read from this file.
bytes_output: u64Bytes written for this file.
pattern_counts: HashMap<String, u64>Per-pattern match counts for this file.
method: StringProcessing method: "scanner", "structured:json", etc.
log_context: Option<LogContextResult>Log context extraction results for this file, present when
--extract-context was used.
match_locations: Option<MatchLocationsResult>Per-match line numbers and byte offsets, present when
--max-match-locations is non-zero and the scanner path is used.
Structured-processor paths do not populate this field.
Implementations§
Source§impl FileReport
impl FileReport
Sourcepub fn from_scan_stats(
path: impl Into<String>,
stats: &ScanStats,
method: impl Into<String>,
) -> Self
pub fn from_scan_stats( path: impl Into<String>, stats: &ScanStats, method: impl Into<String>, ) -> Self
Build a FileReport from scanner ScanStats.
Sourcepub fn with_match_locations(
self,
locations: Vec<MatchLocation>,
truncated: bool,
) -> Self
pub fn with_match_locations( self, locations: Vec<MatchLocation>, truncated: bool, ) -> Self
Attach per-match location data collected via
crate::scanner::StreamScanner::scan_reader_with_callbacks.
No-ops when locations is empty and truncated is false, keeping
the JSON output clean for files with no scanner matches.
Trait Implementations§
Source§impl Clone for FileReport
impl Clone for FileReport
Source§fn clone(&self) -> FileReport
fn clone(&self) -> FileReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FileReport
impl Debug for FileReport
Auto Trait Implementations§
impl Freeze for FileReport
impl RefUnwindSafe for FileReport
impl Send for FileReport
impl Sync for FileReport
impl Unpin for FileReport
impl UnsafeUnpin for FileReport
impl UnwindSafe for FileReport
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more