Type Alias TryFromFn

Source
pub type TryFromFn = for<'src, 'mem, 'shape> unsafe fn(source: PtrConst<'src>, source_shape: &'shape Shape<'shape>, target: PtrUninit<'mem>) -> Result<PtrMut<'mem>, TryFromError<'shape>>;
Expand description

Function to try converting from another type

ยงSafety

The target parameter has the correct layout and alignment, but points to uninitialized memory. If this function succeeds, it should return Ok with the same pointer wrapped in an PtrMut. If conversion fails, it returns Err with an error.