[][src]Function opaque_pointer::object

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

Convert raw pointer to type to type 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.