Function opaque_pointer::mut_object

pub unsafe fn mut_object<'a, T>(
    pointer: *mut T
) -> Result<&'a mut T, PointerError>
Expand description

Mutable reference to a object but without back to own it.

§Errors

The pointer must be not null as it is an obvious invalid pointer.

§Safety

Invalid pointer could cause an undefined behavior or heap error and a crash.