Trait kernel::traits::TryPin[][src]

pub trait TryPin<P: Deref> {
    fn try_pin(data: P::Target) -> Result<Pin<P>, AllocError>;
Expand description

Trait which provides a fallible version of pin() for pointer types.

Common pointer types which implement a pin() method include Box and Arc.

Required methods

Constructs a new Pin<pointer<T>>. If T does not implement Unpin, then data will be pinned in memory and unable to be moved. An error will be returned if allocation fails.