[][src]Function linux::lmem::from_bytes

pub fn from_bytes<T>(buf: &[u8]) -> Option<&T> where
    T: Pod

Turns a slice into a reference to a Pod type if it's suitable.

[argument, buf] The buffer to be turned into a reference.

[return_value] Returns the created reference.

= Remarks

The buffer is suitable under the conditions described in link:lrs::mem::is_suitable_foris_suitable_for.