pub struct Finding {
pub id: usize,
pub secret: String,
pub detector: String,
pub len: usize,
pub field: Option<String>,
pub path: Option<String>,
pub offsets: Vec<usize>,
pub occurrences: usize,
}Expand description
One redacted secret. Every occurrence of the same text shares a finding.
Fields§
§id: usize1-based id of this distinct value in the document. Same text shares
an id. The replacement token is REDACTION-<id>.
secret: StringThe redacted text.
detector: StringWhat detected the first occurrence.
len: usizeLength of the secret in bytes.
field: Option<String>Field (object key) of the value containing the first occurrence, if any.
path: Option<String>Key path of the value containing the first occurrence: the keys of the
enclosing objects and the field itself, joined with .. None for
values that have no key, such as the text of a plain-text file.
offsets: Vec<usize>Byte offsets of every occurrence in the input, ascending, when the format reports value positions. Approximate for values containing escape sequences.
occurrences: usizeHow many times the text was redacted.
Implementations§
Trait Implementations§
impl Eq for Finding
impl StructuralPartialEq for Finding
Auto Trait Implementations§
impl Freeze for Finding
impl RefUnwindSafe for Finding
impl Send for Finding
impl Sync for Finding
impl Unpin for Finding
impl UnsafeUnpin for Finding
impl UnwindSafe for Finding
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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