Trait owned_pin::IntoInner

source ·
pub trait IntoInner: Unpin + Deref {
    // Required method
    fn into_inner(self) -> Self::Target;

    // Provided method
    fn try_unwrap(this: Self) -> Result<Self::Target, Self>
       where Self::Target: Sized,
             Self: Sized { ... }
}
Expand description

Represents a smart pointer whose pointed data can be safely moved out by into_inner.

Implementing this trait proves the smart pointer owns its pointed data.

Required Methods§

source

fn into_inner(self) -> Self::Target

Move out the desired target, and call the possible dropping function of the additional metadata held by the pointer.

Provided Methods§

source

fn try_unwrap(this: Self) -> Result<Self::Target, Self>
where Self::Target: Sized, Self: Sized,

Move out the desired target, and call the possible dropping function of the additional metadata held by the pointer.

Implementations on Foreign Types§

source§

impl<T, A: Allocator + 'static> IntoInner for Box<T, A>

source§

fn into_inner(self) -> T

source§

impl<T, A: Allocator> IntoInner for Rc<T, A>

source§

fn into_inner(self) -> T

source§

fn try_unwrap(this: Self) -> Result<T, Self>

source§

impl<T, A: Allocator> IntoInner for Arc<T, A>

source§

fn into_inner(self) -> T

source§

fn try_unwrap(this: Self) -> Result<T, Self>

Implementors§

source§

impl<'a, T> IntoInner for OnStack<'a, T>