Function lrs::mem::from_mut_bytes

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

Syntax

fn from_mut_bytes<T>(buf: &mut [u8]) -> Option<&mut T>
    where T: Pod,

Arguments

NameDescription
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 is_suitable_for.