pub struct SecretBox<T>(/* private fields */)
where
T: Zeroize + Clone;Expand description
A container for secret data. Makes the usage of secret data explicit and easy to track, prevents the secret data from being put on stack, and zeroizes the contents on drop.
Implementations§
Trait Implementations§
impl<T> ZeroizeOnDrop for SecretBox<T>
Auto Trait Implementations§
impl<T> Freeze for SecretBox<T>
impl<T> RefUnwindSafe for SecretBox<T>where
T: RefUnwindSafe,
impl<T> Send for SecretBox<T>where
T: Send,
impl<T> Sync for SecretBox<T>where
T: Sync,
impl<T> Unpin for SecretBox<T>
impl<T> UnwindSafe for SecretBox<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