pub struct Secret<S> where
S: Zeroize, { /* private fields */ }
Expand description
Wrapper type for values that contains secrets, which attempts to limit accidental exposure and ensure secrets are wiped from memory when dropped. (e.g. passwords, cryptographic keys, access tokens or other credentials)
Access to the secret inner value occurs through the ExposeSecret
trait,
which provides an expose_secret()
method for accessing the inner secret
value.
Implementations
Trait Implementations
Expose secret: this is the only method providing access to a secret.
Auto Trait Implementations
impl<S> RefUnwindSafe for Secret<S> where
S: RefUnwindSafe,
impl<S> UnwindSafe for Secret<S> where
S: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more