Type Alias NewIntoFn

Source
pub type NewIntoFn = for<'ptr> unsafe fn(_: PtrUninit<'ptr>, _: PtrConst<'ptr>) -> PtrMut<'ptr>;
Expand description

Creates a new smart pointer wrapping the given value. Writes the smart pointer into the given this.

Weak pointers don’t even have that function in their vtable.

§Safety

this must have the correct layout.

ptr must point to a value of type T.

After calling this, ptr has been moved out of, and must be deallocated (but not dropped).