Lines Matching full:init
15 init_from_closure, pin_init_from_closure, InPlaceWrite, Init, PinInit, ZeroableOption,
30 fn try_pin_init<E>(init: impl PinInit<T, E>) -> Result<Pin<Self>, E> in try_pin_init()
38 fn pin_init(init: impl PinInit<T>) -> Result<Pin<Self>, AllocError> { in pin_init()
39 // SAFETY: We delegate to `init` and only change the error type. in pin_init()
40 let init = unsafe { in pin_init() localVariable
41 pin_init_from_closure(|slot| match init.__pinned_init(slot) { in pin_init()
46 Self::try_pin_init(init) in pin_init()
50 fn try_init<E>(init: impl Init<T, E>) -> Result<Self, E> in try_init()
55 fn init(init: impl Init<T>) -> Result<Self, AllocError> { in init() method
56 // SAFETY: We delegate to `init` and only change the error type. in init()
57 let init = unsafe { in init() localVariable
58 init_from_closure(|slot| match init.__init(slot) { in init()
63 Self::try_init(init) in init()
82 fn try_pin_init<E>(init: impl PinInit<T, E>) -> Result<Pin<Self>, E> in try_pin_init()
86 try_new_uninit!(Box).write_pin_init(init) in try_pin_init()
90 fn try_init<E>(init: impl Init<T, E>) -> Result<Self, E> in try_init()
94 try_new_uninit!(Box).write_init(init) in try_init()
100 fn try_pin_init<E>(init: impl PinInit<T, E>) -> Result<Pin<Self>, E> in try_pin_init()
110 // SAFETY: When init errors/panics, slot will get deallocated but not dropped, in try_pin_init()
112 unsafe { init.__pinned_init(slot)? }; in try_pin_init()
118 fn try_init<E>(init: impl Init<T, E>) -> Result<Self, E> in try_init()
128 // SAFETY: When init errors/panics, slot will get deallocated but not dropped, in try_init()
130 unsafe { init.__init(slot)? }; in try_init()
139 fn write_init<E>(mut self, init: impl Init<T, E>) -> Result<Self::Initialized, E> { in write_init()
141 // SAFETY: When init errors/panics, slot will get deallocated but not dropped, in write_init()
143 unsafe { init.__init(slot)? }; in write_init()
148 fn write_pin_init<E>(mut self, init: impl PinInit<T, E>) -> Result<Pin<Self::Initialized>, E> { in write_pin_init()
150 // SAFETY: When init errors/panics, slot will get deallocated but not dropped, in write_pin_init()
152 unsafe { init.__pinned_init(slot)? }; in write_pin_init()