devela::_dep::bytemuck

Function fill_zeroes

pub fn fill_zeroes<T>(slice: &mut [T])
where T: Zeroable,
Available on crate feature dep_bytemuck only.
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.