Function safe_transmute::guarded_transmute_pod_many_permissive
[−]
[src]
pub fn guarded_transmute_pod_many_permissive<T: PodTransmutable>(
bytes: &[u8]
) -> &[T]
View a byte slice as a slice of a POD type.
The resulting slice will have as many instances of a type as will fit, rounded down.
Examples
assert_eq!(guarded_transmute_pod_many_permissive::<u16>(&[0x00]), &[]);