Function alass::from_ptr

source · []
pub fn from_ptr<T>(value: *mut T) -> &'static mut T
Expand description

Dereferences a heap pointer and returns a mutable reference, ensuring the value will not be dropped when it goes out of scope. Useful for working with heap values recieved from accross an ffi boundary without dropping them when finished. Panics if pointer is null.