pub enum RedactStyle {
Full,
Mask,
Hash,
}Expand description
How a redacted span is rewritten in redact mode.
Variants§
Full
Replace the whole span with [REDACTED:<category>] (default; maximal removal).
Mask
Keep the last four characters, replace everything before with * (e.g. ***********1234).
Useful when the tail is needed operationally (last-4 of a card) without exposing the rest.
Hash
Replace the span with [REDACTED:<category>:<token>] where <token> is a process-keyed,
non-reversible hash of the canonicalized matched text — so the same value redacts to the same
token throughout a process run (correlatable without exposing the value), while the token can’t
be brute-forced back to the value off the box. See [stable_token].
Trait Implementations§
Source§impl Clone for RedactStyle
impl Clone for RedactStyle
Source§fn clone(&self) -> RedactStyle
fn clone(&self) -> RedactStyle
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 moreimpl Copy for RedactStyle
Source§impl Debug for RedactStyle
impl Debug for RedactStyle
impl Eq for RedactStyle
Source§impl PartialEq for RedactStyle
impl PartialEq for RedactStyle
impl StructuralPartialEq for RedactStyle
Auto Trait Implementations§
impl Freeze for RedactStyle
impl RefUnwindSafe for RedactStyle
impl Send for RedactStyle
impl Sync for RedactStyle
impl Unpin for RedactStyle
impl UnsafeUnpin for RedactStyle
impl UnwindSafe for RedactStyle
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.