Trait ZeroPadding

Source
pub unsafe trait ZeroPadding {
    // Required method
    unsafe fn zero_padding(ptr: *mut 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

unsafe fn zero_padding(ptr: *mut Self)

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

§Safety

ptr must point to memory suitable for holding this type.

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§

unsafe fn zero_padding(_: *mut Self)

Source§

impl ZeroPadding for i8

Source§

unsafe fn zero_padding(_: *mut Self)

Source§

impl ZeroPadding for u8

Source§

unsafe fn zero_padding(_: *mut Self)

Source§

impl ZeroPadding for ()

Source§

unsafe fn zero_padding(_: *mut Self)

Source§

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

Source§

unsafe fn zero_padding(backing: *mut Self)

Implementors§