Skip to main content

PtrPinWith

Trait PtrPinWith 

Source
pub trait PtrPinWith<T>: Deref<Target = T> + Sized {
    // Required method
    fn pin_with<E, I>(init: I) -> Result<Pin<Self>, E>
       where I: Init<T, E>;
}
Available on crate feature alloc_pin_with only.
Expand description

Pointer types that can be pin-newed.

Required Methods§

Source

fn pin_with<E, I>(init: I) -> Result<Pin<Self>, E>
where I: Init<T, E>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> PtrPinWith<T> for Arc<T>

Source§

fn pin_with<E, I>(init: I) -> Result<Pin<Self>, E>
where I: Init<T, E>,

Source§

impl<T> PtrPinWith<T> for Box<T>

Source§

fn pin_with<E, I>(init: I) -> Result<Pin<Self>, E>
where I: Init<T, E>,

Source§

impl<T> PtrPinWith<T> for Rc<T>

Source§

fn pin_with<E, I>(init: I) -> Result<Pin<Self>, E>
where I: Init<T, E>,

Implementors§

Source§

impl<T> PtrPinWith<T> for UniqueArc<T>

Source§

impl<T> PtrPinWith<T> for UniqueRc<T>