Creates a new vector from its raw parts.
impl<T, H> Vec<T, H>
where H: Allocator,
{
unsafe fn from_raw_parts(ptr: *mut T, len: usize, cap: usize, pool: <H as Allocator>::Pool) -> Vec<T, H>
}| Name | Description |
|---|---|
| ptr | The pointer to the first element of the vector. |
| len | The number of elements in the vector. |
| cap | The capacity of the array pointed to by the pointer. |
| pool | |
The allocator must be the same allocator that was used to allocate the memory.