Trait PointerIntoInner

Source
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§

Source

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.

Implementations on Foreign Types§

Source§

impl<Ptr: PointerIntoInner> PointerIntoInner for Pin<Ptr>
where Ptr::Pointee: Unpin,

Source§

fn into_inner(self) -> Self::Pointee

Source§

impl<T> PointerIntoInner for Box<T>

Source§

fn into_inner(self) -> Self::Pointee

Implementors§