[][src]Function safe_transmute::safe_transmute_many_permissive

pub fn safe_transmute_many_permissive<T: PodTransmutable>(
    bytes: &[u8]
) -> Result<&[T], Error>

Transmute a byte slice into a sequence of values of the given type.

Errors

An error is returned in one of the following situations:

Examples

assert_eq!(safe_transmute_many_permissive::<u16>(&[0x00]), Ok([].as_ref()));