Trait ZeroPadding

Source
pub unsafe trait ZeroPadding: Sized {
    // Required method
    fn zero_padding(out: &mut MaybeUninit<Self>);
}
Expand description

Zeroes the padding of this type.

§Safety

zero_padding must write zeroes to at least the padding bytes of the pointed-to memory.

Required Methods§

Source

fn zero_padding(out: &mut MaybeUninit<Self>)

Writes zeroes to the padding for this type, if any.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ZeroPadding for bool

Source§

impl ZeroPadding for i8

Source§

impl ZeroPadding for u8

Source§

impl ZeroPadding for ()

Source§

impl<T: ZeroPadding, const N: usize> ZeroPadding for [T; N]

Source§

fn zero_padding(out: &mut MaybeUninit<Self>)

Implementors§