pub struct Redacted<T>(/* private fields */);Expand description
Wraps a value and masks it in fmt::Debug output as [REDACTED].
Use this for sensitive fields (e.g. passwords) to prevent them from leaking into logs or debug output.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Redacted<T>where
T: Freeze,
impl<T> RefUnwindSafe for Redacted<T>where
T: RefUnwindSafe,
impl<T> Send for Redacted<T>where
T: Send,
impl<T> Sync for Redacted<T>where
T: Sync,
impl<T> Unpin for Redacted<T>where
T: Unpin,
impl<T> UnsafeUnpin for Redacted<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Redacted<T>where
T: UnwindSafe,
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