unsafe fn slice_to_u8_mut<T: Copy>(slice: &mut [T]) -> &mut [u8]Notable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
Expand description

Convert a slice of T (where T is plain old data) to its mutable binary representation.

This function is wildly unsafe because it permits arbitrary modification of the binary representation of any Copy type. Use with care. It’s intended to be called only where T is a numeric type.