pub unsafe fn from_manuallydrop<T: ?Sized>(
slot: &mut ManuallyDrop<T>,
) -> OwningRef<'_, T>Expand description
Create a OwningRef<'a, T> from a &'a mut ManuallyDrop<T>>.
ยงSafety
Dropping or moving out of the OwningRef leaves the borrowed ManuallyDrop
semantically without a value; see ManuallyDrop::drop and
ManuallyDrop::take.
You must not use the Box in such a way that would violate the vailidity
invariant of the ManuallyDrop<T>.