pub type NewIntoFn = unsafe fn(this: PtrUninit, ptr: PtrMut) -> PtrMut;Expand description
Creates a new pointer wrapping the given value.
Initializes the pointer into the given this, and returns a copy of this, which has
been guaranteed to be initialized.
This can only be used with strong pointers (like alloc::sync::Arc or alloc::rc::Rc).
§Safety
this must be allocated, and of the right layout for the corresponding pointer.
this must not have been initialized yet.
ptr must point to a value of type T.
ptr is moved out of (with core::ptr::read) — it should be deallocated afterwards (e.g.
with core::mem::forget) but NOT dropped).