Struct pin_api::PinBox [] [src]

pub struct PinBox<T: ?Sized> { /* fields omitted */ }

A PinBox is a box that pins the data inside it. It guarantees that that data will not be moved out of it unless that data implements the Unpin trait.

Methods

impl<T> PinBox<T>
[src]

[src]

Pin a pointer to the heap.

[src]

Move the inner type out of the PinBox.

This is unsafe because the type may be a type which is not safe to move.

impl<T: ?Sized> PinBox<T>
[src]

[src]

Get a mutable pinned reference to the data in this PinBox.

[src]

Get a mutable pinned reference to the data in this PinBox.

[src]

Move the inner box out of this PinBox.

This is unsafe because it is possible to move the interior type out of this box, and the interior type may be a type that is not safe to move.

impl<T: Unpin> PinBox<T>
[src]

[src]

Move the data from this PinBox onto the stack.

impl<T: Unpin + ?Sized> PinBox<T>
[src]

[src]

Consume this PinBox and get the internal Box out of it.

Trait Implementations

impl<T: Unpin + ?Sized> Deref for PinBox<T>
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl<T: Unpin + ?Sized> DerefMut for PinBox<T>
[src]

[src]

Mutably dereferences the value.

impl<T: ?Sized> From<Box<T>> for PinBox<T>
[src]

[src]

Performs the conversion.

impl<T: ?Sized> Unpin for PinBox<T>
[src]

impl<T: ?Sized, U> CoerceUnsized<PinBox<U>> for PinBox<T> where
    T: Unsize<U>,
    U: ?Sized
[src]

Auto Trait Implementations

impl<T: ?Sized> Send for PinBox<T> where
    T: Send

impl<T: ?Sized> Sync for PinBox<T> where
    T: Sync