Function bytemuck::try_pod_read_unaligned[][src]

pub fn try_pod_read_unaligned<T: AnyBitPattern>(
    bytes: &[u8]
) -> Result<T, PodCastError>
Expand description

Reads from the bytes as if they were a T.

Failure

  • If the bytes length is not equal to size_of::<T>().