pub struct SecretString(/* private fields */);Expand description
A secret string that is securely zeroed from memory when dropped.
This type is only available when the zeroize feature is enabled.
It ensures that sensitive data like passwords and tokens are overwritten
with zeros when they go out of scope.
Implementations§
Trait Implementations§
Source§impl Clone for SecretString
impl Clone for SecretString
Source§fn clone(&self) -> SecretString
fn clone(&self) -> SecretString
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SecretString
Available on crate feature zeroize only.
impl Debug for SecretString
Available on crate feature
zeroize only.Source§impl Drop for SecretString
impl Drop for SecretString
Source§impl From<&str> for SecretString
Available on crate feature zeroize only.
impl From<&str> for SecretString
Available on crate feature
zeroize only.Source§impl From<String> for SecretString
Available on crate feature zeroize only.
impl From<String> for SecretString
Available on crate feature
zeroize only.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