[][src]Struct futures_util::future::Shared

#[must_use = "futures do nothing unless polled"]
pub struct Shared<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: Future> Unpin for Shared<Fut>
[src]

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

Formats the value using the given formatter. Read more

impl<Fut: Future> Future for Shared<Fut>
[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

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> Drop for Shared<Fut> where
    Fut: Future
[src]

Executes the destructor for this type. 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