Function pin_init::cast_init

source ·
pub const unsafe fn cast_init<T, U, E>(init: impl Init<T, E>) -> impl Init<U, E>
Expand description

Changes the to be initialized type.

§Safety

  • *mut U must be castable to *mut T and any value of type T written through such a pointer must result in a valid U.