Skip to main content

raw_init

Function raw_init 

Source
pub unsafe fn raw_init<T>(slot: *mut T, init: impl PinInit<T>)
Expand description

Initializes slot with an initializer.

ยงSafety

  • slot is a valid pointer to uninitialized memory.
  • slot will not move until it is dropped, i.e. it will be pinned. If init implements Init<T, E>, this requirement is cancelled and it may be moved.