Function object::pod::slice_from_all_bytes_mut

source ยท
pub fn slice_from_all_bytes_mut<T: Pod>(data: &mut [u8]) -> Result<&mut [T], ()>
Expand description

Cast all of a byte slice to a slice of a Pod type.

Returns the type slice.

Returns an error if the size of the byte slice is not an exact multiple of the type size, or the alignment is invalid.