OptionReplaceWithFn

Type Alias OptionReplaceWithFn 

Source
pub type OptionReplaceWithFn = unsafe fn(option: PtrMut, value: Option<PtrConst>);
Expand description

Replace an existing option with a new value

§Safety

The option parameter must point to aligned, initialized memory of the correct type. The old value will be dropped. If replacing with Some, value is moved out of (with core::ptr::read) — it should be deallocated afterwards but NOT dropped.