[][src]Struct std::pin::PinMut

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

A pinned reference.

This type is similar to a mutable reference, except that it pins its value, which prevents it from moving out of the reference, unless it implements Unpin.

See the pin module documentation for furthur explanation on pinning.

Methods

impl<'a, T> PinMut<'a, T> where
    T: Unpin + ?Sized
[src]

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

Construct a new PinMut around a reference to some data of a type that implements Unpin.

Important traits for &'a mut I

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

Get a mutable reference to the data inside of this PinMut.

impl<'a, T> PinMut<'a, T> where
    T: ?Sized
[src]

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

Construct a new PinMut around a reference to some data of a type that may or may not implement Unpin.

This constructor is unsafe because we do not know what will happen with that data after the lifetime of the reference ends. If you cannot guarantee that the data will never move again, calling this constructor is invalid.

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

Reborrow a PinMut for a shorter lifetime.

For example, PinMut::get_mut(x.reborrow()) (unsafely) returns a short-lived mutable reference reborrowing from x.

Important traits for &'a mut I

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

Get a mutable reference to the data inside of this PinMut.

This function is unsafe. You must guarantee that you will never move the data out of the mutable reference you receive when you call this function.

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

Construct a new pin by mapping the interior value.

For example, if you wanted to get a PinMut of a field of something, you could use this to get access to that field in one line of code.

This function is unsafe. You must guarantee that the data you return will not move so long as the argument value does not move (for example, because it is one of the fields of that value), and also that you do not move out of the argument you receive to the interior function.

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

Assign a new value to the memory behind the pinned reference.

Trait Implementations

impl<'a, T, F> UnsafeFutureObj<'a, T> for PinMut<'a, F> where
    F: Future<Output = T> + 'a, 
[src]

🔬 This is a nightly-only experimental API. (futures_api #50547)

futures in libcore are unstable

Convert an owned instance into a (conceptually owned) void pointer.

🔬 This is a nightly-only experimental API. (futures_api #50547)

futures in libcore are unstable

Poll the future represented by the given void pointer. Read more

🔬 This is a nightly-only experimental API. (futures_api #50547)

futures in libcore are unstable

Drops the future represented by the given void pointer. Read more

impl<'a, T> Pointer for PinMut<'a, T> where
    T: ?Sized
[src]

Formats the value using the given formatter.

impl<'a, T> Debug for PinMut<'a, T> where
    T: Debug + ?Sized
[src]

Formats the value using the given formatter. Read more

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

impl<'a, T> Unpin for PinMut<'a, T> where
    T: ?Sized
[src]

impl<'a, F> Future for PinMut<'a, F> where
    F: Future + ?Sized
[src]

🔬 This is a nightly-only experimental API. (futures_api #50547)

futures in libcore are unstable

The result of the Future.

🔬 This is a nightly-only experimental API. (futures_api #50547)

futures in libcore are unstable

Attempt to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more

impl<'a, T> DerefMut for PinMut<'a, T> where
    T: Unpin + ?Sized
[src]

Important traits for &'a mut I

Mutably dereferences the value.

impl<'a, T> Deref for PinMut<'a, T> where
    T: ?Sized
[src]

The resulting type after dereferencing.

Important traits for &'a mut I

Dereferences the value.

impl<'a, T> Display for PinMut<'a, T> where
    T: Display + ?Sized
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'a, T: ?Sized> Send for PinMut<'a, T> where
    T: Send

impl<'a, T: ?Sized> Sync for PinMut<'a, T> where
    T: Sync

Blanket Implementations

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from #33417)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from #33417)

Performs the conversion.

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from #33417)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from #33417)

Performs the conversion.

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

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

Important traits for &'a mut I

Immutably borrows from an owned value. Read more

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

Important traits for &'a mut I

Mutably borrows from an owned value. Read more

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 This is a nightly-only experimental API. (get_type_id #27745)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

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

Converts the given value to a String. Read more