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