pub struct SecretString(/* private fields */);Expand description
Secret text: passwords, plaintexts and the decrypted text the server returns.
The buffer is overwritten with zeros when the value is dropped, and
Debug prints SecretString(<redacted>). There is no Display and
no PartialEq: read the text with SecretString::expose_secret.
Implementations§
Source§impl SecretString
impl SecretString
Trait Implementations§
Source§impl Clone for SecretString
impl Clone for SecretString
Source§impl Debug for SecretString
impl Debug for SecretString
Source§impl Default for SecretString
impl Default for SecretString
Source§impl<'de> Deserialize<'de> for SecretString
impl<'de> Deserialize<'de> for SecretString
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
Source§impl From<&str> for SecretString
impl From<&str> for SecretString
Source§impl From<String> for SecretString
impl From<String> for SecretString
Auto Trait Implementations§
impl Forget for SecretString
impl Freeze for SecretString
impl Move 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