Trait pinned_init::PinInit
source · [−]pub unsafe trait PinInit<T, E = Infallible>: Sized {
unsafe fn __pinned_init(self, place: *mut T) -> Result<(), E>;
}Expand description
An initializer for T.
Safety
The PinInit::__pinned_init function
- returns
Ok(())iff it initialized every field of place, - returns
Err(err)iff it encountered an error and then cleaned place, this means:- place can be deallocated without UB ocurring,
- place does not need to be dropped,
- place is not partially initialized.