pub struct Secret<T: Zeroize>(/* private fields */);Expand description
A secret value whose formatted representations never reveal its contents.
The inner value is zeroized when the wrapper is dropped. Access is deliberately
named Secret::expose so reviews can find places where secrets are revealed.
Implementations§
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for Secret<T>where
T: Deserialize<'de> + Zeroize,
impl<'de, T> Deserialize<'de> for Secret<T>where
T: Deserialize<'de> + Zeroize,
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<T> Freeze for Secret<T>where
T: Freeze,
impl<T> RefUnwindSafe for Secret<T>where
T: RefUnwindSafe,
impl<T> Send for Secret<T>where
T: Send,
impl<T> Sync for Secret<T>where
T: Sync,
impl<T> Unpin for Secret<T>where
T: Unpin,
impl<T> UnsafeUnpin for Secret<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Secret<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