Struct std::boxed::PinBox [] [src]

pub struct PinBox<T> where
    T: ?Sized
{ /* fields omitted */ }
🔬 This is a nightly-only experimental API. (pin #49150)

A pinned, heap allocated reference.

Methods

impl<T> PinBox<T>
[src]

🔬 This is a nightly-only experimental API. (pin #49150)

Allocate memory on the heap, move the data into it and pin it.

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

🔬 This is a nightly-only experimental API. (pin #49150)

Get a pinned reference to the data in this PinBox.

Important traits for &'a mut I

🔬 This is a nightly-only experimental API. (pin #49150)

Get a mutable reference to the data inside this PinBox.

This function is unsafe. Users must guarantee that the data is never moved out of this reference.

Important traits for Box<I>

🔬 This is a nightly-only experimental API. (pin #49150)

Convert this PinBox into an unpinned Box.

This function is unsafe. Users must guarantee that the data is never moved out of the box.

Trait Implementations

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

Formats the value using the given formatter.

impl<T> Display for PinBox<T> where
    T: Display + ?Sized
[src]

Formats the value using the given formatter. Read more

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

Important traits for &'a mut I

Mutably dereferences the value.

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

Important traits for Box<I>

Performs the conversion.

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

Performs the conversion.

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

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

The resulting type after dereferencing.

Important traits for &'a mut I

Dereferences the value.

impl<T> Debug for PinBox<T> where
    T: Debug + ?Sized
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

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

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