pub trait Zeroize {
fn zeroize(&mut self);
}
Expand description
Trait for securely erasing types from memory
Required methods
Implementations on Foreign Types
sourceimpl Zeroize for NonZeroI16
impl Zeroize for NonZeroI16
sourceimpl Zeroize for NonZeroI32
impl Zeroize for NonZeroI32
sourceimpl Zeroize for NonZeroI64
impl Zeroize for NonZeroI64
sourceimpl Zeroize for NonZeroI128
impl Zeroize for NonZeroI128
sourceimpl Zeroize for NonZeroIsize
impl Zeroize for NonZeroIsize
sourceimpl Zeroize for NonZeroU16
impl Zeroize for NonZeroU16
sourceimpl Zeroize for NonZeroU32
impl Zeroize for NonZeroU32
sourceimpl Zeroize for NonZeroU64
impl Zeroize for NonZeroU64
sourceimpl Zeroize for NonZeroU128
impl Zeroize for NonZeroU128
sourceimpl Zeroize for NonZeroUsize
impl Zeroize for NonZeroUsize
sourceimpl<Z, const N: usize> Zeroize for [Z; N] where
Z: Zeroize,
impl<Z, const N: usize> Zeroize for [Z; N] where
Z: Zeroize,
Implement Zeroize
on arrays of types that impl Zeroize
sourceimpl<Z> Zeroize for [MaybeUninit<Z>]
impl<Z> Zeroize for [MaybeUninit<Z>]
Impl Zeroize
on slices of MaybeUninit types
This impl can eventually be optimized using an memset intrinsic,
such as core::intrinsics::volatile_set_memory
.
This fills the slice with zeros
Note that this ignore invariants that Z might have, because MaybeUninit removes all invariants.
sourceimpl<Z> Zeroize for [Z] where
Z: DefaultIsZeroes,
impl<Z> Zeroize for [Z] where
Z: DefaultIsZeroes,
Impl Zeroize
on slices of types that can be zeroized with Default
.
This impl can eventually be optimized using an memset intrinsic,
such as core::intrinsics::volatile_set_memory
. For that reason the blanket
impl on slices is bounded by DefaultIsZeroes
.
To zeroize a mut slice of Z: Zeroize
which does not impl
DefaultIsZeroes
, call iter_mut().zeroize()
.
sourceimpl<Z> Zeroize for PhantomData<Z>
impl<Z> Zeroize for PhantomData<Z>
PhantomData
is always zero sized so provide a Zeroize implementation.
sourceimpl Zeroize for PhantomPinned
impl Zeroize for PhantomPinned
PhantomPinned
is zero sized so provide a Zeroize implementation.
sourceimpl<A: Zeroize> Zeroize for (A,)
impl<A: Zeroize> Zeroize for (A,)
Generic implementation of Zeroize for tuples up to 10 parameters.