pub struct Redacted<T>(pub T);Expand description
Wraps a sensitive value so its Debug output doesn’t leak the contents.
Serialises and deserialises as the inner value, so it is transparent on the
wire; only Debug is withheld. Read the value through Deref
or the public field.
Tuple Fields§
§0: TTrait Implementations§
Source§impl<'de, T: Deserialize<'de>> Deserialize<'de> for Redacted<T>
impl<'de, T: Deserialize<'de>> Deserialize<'de> for Redacted<T>
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
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