pub struct SecretString(/* private fields */);Expand description
Implementations§
Source§impl SecretString
impl SecretString
Sourcepub fn expose(&self) -> &str
pub fn expose(&self) -> &str
Provide read-only access to the underlying secret.
Callers must not log, store, or otherwise persist the returned slice.
Sourcepub fn into_inner(self) -> String
pub fn into_inner(self) -> String
Consume self and return the underlying secret, e.g. to move it into
another owned value without an extra clone.
Callers must not log, store, or otherwise persist the returned value.
Trait Implementations§
Source§impl Clone for SecretString
impl Clone for SecretString
Source§impl Debug for SecretString
impl Debug for SecretString
Source§impl<'de> Deserialize<'de> for SecretString
Available on crate feature serde only.
impl<'de> Deserialize<'de> for SecretString
Available on crate feature
serde only.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
Source§impl Display for SecretString
impl Display for SecretString
Source§impl Drop for SecretString
impl Drop for SecretString
Auto Trait Implementations§
impl Freeze for SecretString
impl RefUnwindSafe for SecretString
impl Send for SecretString
impl Sync for SecretString
impl Unpin for SecretString
impl UnsafeUnpin for SecretString
impl UnwindSafe for SecretString
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