pub struct SecretSet { /* private fields */ }Expand description
The plaintext of every secret a run has seen, for scrubbing free text.
Its Debug output shows only the number of values.
Implementations§
Source§impl SecretSet
impl SecretSet
Sourcepub fn observe(&self, value: &Value)
pub fn observe(&self, value: &Value)
Remember the plaintext of value and of any secret nested in it.
Sourcepub fn scrub<'a>(&self, text: &'a str) -> Cow<'a, str>
pub fn scrub<'a>(&self, text: &'a str) -> Cow<'a, str>
text with every observed secret replaced by SECRET_MASK.
Sourcepub fn scrub_in_place(&self, message: &mut String)
pub fn scrub_in_place(&self, message: &mut String)
Scrub message in place.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SecretSet
impl Forget for SecretSet
impl Move for SecretSet
impl RefUnwindSafe for SecretSet
impl Send for SecretSet
impl Sync for SecretSet
impl Unpin for SecretSet
impl UnsafeUnpin for SecretSet
impl UnwindSafe for SecretSet
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