Skip to main content

SafeMemzero

Trait SafeMemzero 

Source
pub trait SafeMemzero {
    // Required method
    fn safe_memzero(&mut self);
}
Expand description

A trait to be implemented for a segment of memory that can be explicitly zeroed in a way that will not be optimized away by the compiler.

Required Methods§

Source

fn safe_memzero(&mut self)

Zero the data in the buffer. To enable managed zeroing of a buffer, call this in a Drop implementation.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl SafeMemzero for SafeBorrowedMemZero

Available on cryptsetup23supported only.
Source§

impl SafeMemzero for SafeMemHandle

Available on cryptsetup23supported only.
Source§

impl SafeMemzero for SafeOwnedMemZero

Available on cryptsetup23supported only.