Function lrs::slice::from_ptr

Creates a slice from a pointer and a length.

Syntax

unsafe fn from_ptr<T>(ptr: *const T, len: usize) -> &'a mut [T]

Arguments

NameDescription
ptr

The pointer to the first element of the slice.

len

The number of elements in the slice.

Return value

Returns a slice made up of the arguments.

Remarks

The arguments must be valid or the behavior is undefined.