bytemuck

Function write_zeroes

source
pub fn write_zeroes<T: Zeroable>(target: &mut T)
Expand description

Fill all bytes of target with zeroes (see Zeroable).

This is similar to *target = Zeroable::zeroed(), but guarantees that any padding bytes in target are zeroed as well.

See also fill_zeroes, if you have a slice rather than a single value.