pub struct ScanResult {
pub findings: Vec<CredentialFinding>,
}Expand description
The result of a CredentialScanner::scan call.
Fields§
§findings: Vec<CredentialFinding>All credential findings detected in the scanned text, sorted by byte offset.
Implementations§
Source§impl ScanResult
impl ScanResult
Sourcepub fn redact(&self, text: &str) -> String
pub fn redact(&self, text: &str) -> String
Returns a copy of text with every finding replaced by its redacted label.
Replacements are applied in reverse offset order so earlier byte positions
remain valid after each splice. The end field of each finding records the
original match boundary and is used here without being exposed in the public API.
Trait Implementations§
Source§impl Clone for ScanResult
impl Clone for ScanResult
Source§fn clone(&self) -> ScanResult
fn clone(&self) -> ScanResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ScanResult
impl Debug for ScanResult
impl Eq for ScanResult
Source§impl PartialEq for ScanResult
impl PartialEq for ScanResult
Source§fn eq(&self, other: &ScanResult) -> bool
fn eq(&self, other: &ScanResult) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ScanResult
Auto Trait Implementations§
impl Freeze for ScanResult
impl RefUnwindSafe for ScanResult
impl Send for ScanResult
impl Sync for ScanResult
impl Unpin for ScanResult
impl UnsafeUnpin for ScanResult
impl UnwindSafe for ScanResult
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