pub struct SecretVec(/* private fields */);Expand description
An owned byte vector that zeroizes its allocation when dropped.
The whole allocation is overwritten, spare capacity included. A SecretVec never grows: a
buffer that does (Vec::extend, push) moves to a new allocation and leaves the old one
behind unerased, so build key material in a buffer sized up front and wrap it here.
Implementations§
Trait Implementations§
impl ZeroizeOnDrop for SecretVec
Auto Trait Implementations§
impl Forget for SecretVec
impl Freeze for SecretVec
impl Move for SecretVec
impl RefUnwindSafe for SecretVec
impl Send for SecretVecwhere
RawVecInner: Send,
impl Sync for SecretVecwhere
RawVecInner: Sync,
impl Unpin for SecretVec
impl UnsafeUnpin for SecretVec
impl UnwindSafe for SecretVecwhere
RawVecInner: 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