pub unsafe trait PointerIntoInner: PointerDerefMut + DerefMut {
// Required method
fn into_inner(self) -> Self::Pointee;
}
Expand description
Trait that allows to move pointed-at object out of a smart-pointer, and then, presumably, deallocating the smart-pointer.
§Safety
Implementer must guarantee safety of moving out of the
original smart-pointer and a raw pointer returned from
PointerLike::into_ptr
via the Self::into_inner
method.
Required Methods§
fn into_inner(self) -> Self::Pointee
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.