[][src]Function opaque_pointer::mut_object

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

Convert raw pointer to type into type mutable reference but without back to own it.

That's the main difference with own_back<T>, it does not back to use ownership and values will not be dropped.

Safety

The pointer must be a valid reference and never call it twice or behavior is undefined.

That could produce a HEAP error that produce a crash.