bytemuck

Function fill_zeroes

source
pub fn fill_zeroes<T: Zeroable>(slice: &mut [T])
Expand description

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

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

See also write_zeroes, which zeroes all bytes of a single value rather than a slice.