Function from_bytes

fn from_bytes<T: Pod>(data: &[u8]) -> result::Result<(&T, &[u8]), ()>

Cast the head of a byte slice to a Pod type.

Returns the type and the tail of the byte slice.

Returns an error if the byte slice is too short or the alignment is invalid.