Struct alloc::boxed::PinBox [] [src]

pub struct PinBox<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: ?Sized> PinBox<T>
[src]

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

Get a pinned reference to the data in this PinBox.

🔬 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: ?Sized> From<Box<T>> for PinBox<T>
[src]

Performs the conversion.

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

Important traits for Box<I>

Performs the conversion.

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

The resulting type after dereferencing.

Dereferences the value.

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

Mutably dereferences the value.

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

Formats the value using the given formatter. Read more

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

Formats the value using the given formatter. Read more

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

Formats the value using the given formatter.

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

Auto Trait Implementations

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

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