get_record_from_slice

Function get_record_from_slice 

Source
pub unsafe fn get_record_from_slice<'a, T, F, L>(
    slice: &mut &'a mut [F],
    layout: L,
) -> T
where [u8]: CustomBorrow<'a, T, L>,
Expand description

Converts a field element slice into a record type. This function transmutes the &mut [F] to raw bytes, then uses the CustomBorrow trait to transmute to the desired record type T.

ยงSafety

slice must satisfy the requirements of the CustomBorrow trait.