pub fn byte_slice_mut_from<T: Pod>(val: &mut T) -> &mut [u8]
Expand description

Gets mutable byte slice out of the type.

Available only for types that marked as Pod.

Usage

use lazy_bytes_cast::byte_slice_mut_from;

let bytes = byte_slice_mut_from(&mut 0u32);

Restrictions

Compilation fails for invalid type.

use lazy_bytes_cast::byte_slice_mut_from;

let bytes = byte_slice_mut_from(&mut ());