Trait ZeroPadding

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§

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§

§

impl ZeroPadding for bool

§

impl ZeroPadding for i8

§

impl ZeroPadding for u8

§

impl ZeroPadding for ()

§

impl ZeroPadding for WireMessageHeader

§

fn zero_padding(_: &mut MaybeUninit<WireMessageHeader>)

§

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

Implementors§