pub unsafe fn raw_try_init<T, E>(
slot: *mut T,
init: impl PinInit<T, E>,
) -> Result<(), E>Expand description
Fallibly initializes slot with an initializer.
ยงSafety
slotis a valid pointer to uninitialized memory.- the caller does not touch
slotwhenErris returned, they are only permitted to deallocate. slotwill not move until it is dropped, i.e. it will be pinned. IfinitimplementsInit<T, E>, this requirement is cancelled and it may be moved.