Struct Zeroizing
#[repr(transparent)]
pub struct Zeroizing<Z: Zeroize + ?Sized>(/* private field */);
Zeroizing is a wrapper for any Z: Zeroize type which implements a
Drop handler which zeroizes dropped values.
Zeroizing<T> is defined with repr(transparent), which means it is
guaranteed to have the same physical representation as the underlying type.
Implementations
impl<Z> Zeroizing<Z>
where
Z: Zeroize,
fn new(value: Z) -> SelfMove value inside a
Zeroizingwrapper which ensures it will be zeroized when it's dropped.
Trait Implementations
impl<T, Z> AsMut<T> for Zeroizing<Z>
where
T: ?Sized,
Z: AsMut<T> + Zeroize + ?Sized,
fn as_mut(&mut self) -> &mut T
impl<T, Z> AsRef<T> for Zeroizing<Z>
where
T: ?Sized,
Z: AsRef<T> + Zeroize + ?Sized,
fn as_ref(&self) -> &T
impl<Z> Deref for Zeroizing<Z>
where
Z: Zeroize + ?Sized,
type Target = Z;fn deref(&self) -> &Z
impl<Z> DerefMut for Zeroizing<Z>
where
Z: Zeroize + ?Sized,
fn deref_mut(&mut self) -> &mut Z
impl<Z> Drop for Zeroizing<Z>
where
Z: Zeroize + ?Sized,
fn drop(&mut self)
impl<Z> From<Z> for Zeroizing<Z>
where
Z: Zeroize,
fn from(value: Z) -> Zeroizing<Z>
impl<Z> Zeroize for Zeroizing<Z>
where
Z: Zeroize + ?Sized,
fn zeroize(&mut self)
impl<Z> ZeroizeOnDrop for Zeroizing<Z>
where
Z: Zeroize + ?Sized,
impl<Z: Default + Zeroize + ?Sized> Default for Zeroizing<Z>
fn default() -> Self
impl<Z: Eq + Zeroize + ?Sized> Eq for Zeroizing<Z>
impl<Z: PartialEq + Zeroize + ?Sized> PartialEq for Zeroizing<Z>
fn eq(&self, other: &Self) -> bool
impl<Z: PartialEq + Zeroize + ?Sized> StructuralPartialEq for Zeroizing<Z>
impl<Z: Zeroize + ?Sized> Debug for Zeroizing<Z>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<Z: Zeroize + Clone> Clone for Zeroizing<Z>
fn clone(&self) -> Selffn clone_from(&mut self, source: &Self)