Function shadow_pod::to_u8_slice_mut

source ·
pub unsafe fn to_u8_slice_mut<T>(slice: &mut [T]) -> &mut [MaybeUninit<u8>]
where T: Pod,
Expand description

Convert to a mut slice of raw bytes.

Some bytes may be uninialized if T has padding.

§Safety

Uninitialized bytes (e.g. MaybeUninit::uninit) must not be written into the returned slice, which would invalidate the source slice.