Function read_array_like_ptr_at

Source
pub unsafe fn read_array_like_ptr_at<T>(
    bytes: &[u8],
    offset: &mut usize,
    len: usize,
) -> *mut T
Expand description

Casts a part of provided bytes buffer with the given offset to a mutable pointer to T.

Should be used for array-type sequences.

§Safety

This is higly unsafe. This function doesn’t ensure alignment and correctness of provided buffer. The responsibility of such checks is on the caller.