Struct futures::future::Shared[][src]

#[must_use = "futures do nothing unless polled"]
pub struct Shared<Fut> where
    Fut: Future
{ /* fields omitted */ }

A future that is cloneable and can be polled in multiple threads. Use Future::shared() method to convert any future into a Shared future.

Methods

impl<Fut> Shared<Fut> where
    Fut: Future
[src]

If any clone of this Shared has completed execution, returns its result immediately without blocking. Otherwise, returns None without triggering the work represented by this Shared.

Trait Implementations

impl<Fut> Unpin for Shared<Fut> where
    Fut: Future
[src]

impl<Fut> Drop for Shared<Fut> where
    Fut: Future
[src]

Executes the destructor for this type. Read more

impl<Fut> Clone for Shared<Fut> where
    Fut: Future
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<Fut> Debug for Shared<Fut> where
    Fut: Future
[src]

Formats the value using the given formatter. Read more

impl<Fut> Future for Shared<Fut> where
    Fut: Future
[src]

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

futures in libcore are unstable

The result of the Future.

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

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

Auto Trait Implementations

impl<Fut> Send for Shared<Fut> where
    Fut: Send,
    <Fut as Future>::Output: Send + Sync

impl<Fut> Sync for Shared<Fut> where
    Fut: Send,
    <Fut as Future>::Output: Send + Sync