pub fn pod_maybe_from_bytes<T: Pod>(
    bytes: &[u8]
) -> Result<Option<&T>, ProgramError>
Expand description

Maybe convert a slice into a Pod (zero copy)

Returns None if the slice is empty, but Err if all other lengths but get_packed_len() This function exists primarily because Option<T> is not a Pod.