devela::_dep::bytemuck

Function write_zeroes

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