Function own_back
pub unsafe fn own_back<T: 'static>(pointer: *mut T) -> Result<T, PointerError>Expand description
Opposite of raw<T>(), to use Rust’s ownership as usually.
drop(unsafe { opaque_pointer::own_back(pointer) });§Errors
The pointer must be not null as it is an obvious invalid pointer.
Also, the type must be the same as the original.
§Safety
Invalid pointer or call it twice could cause an undefined behavior or heap error and a crash.