pub struct ScanStats {
pub bytes_processed: u64,
pub bytes_output: u64,
pub matches_found: u64,
pub replacements_applied: u64,
pub pattern_counts: HashMap<String, u64>,
}Expand description
Statistics collected during a scan operation.
Returned by StreamScanner::scan_reader and
StreamScanner::scan_bytes to provide visibility into what
the scanner did.
Fields§
§bytes_processed: u64Total bytes read from the input.
bytes_output: u64Total bytes written to the output (may differ from bytes_processed
when replacements have different lengths than the originals).
matches_found: u64Total number of matches found across all patterns.
replacements_applied: u64Total number of replacements applied (always == matches_found
in one-way mode).
pattern_counts: HashMap<String, u64>Per-pattern match counts, keyed by pattern label.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ScanStats
impl RefUnwindSafe for ScanStats
impl Send for ScanStats
impl Sync for ScanStats
impl Unpin for ScanStats
impl UnsafeUnpin for ScanStats
impl UnwindSafe for ScanStats
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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