Function alloc_slice

Source
fn alloc_slice<T>(buf: &mut [u8], len: usize) -> Option<(&mut [T], &mut [u8])>
Expand description

Allocates a mutable slice of T of the given length from the specified buffer.

Returns the allocated slice and the remainder of the buffer.