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

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

[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<F> Debug for Shared<F> where
    F: Future + Debug,
    <F as Future>::Item: Debug,
    <F as Future>::Error: Debug
[src]

[src]

Formats the value using the given formatter. Read more

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

A successful value

An error

[src]

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

[src]

Executes the destructor for this type. Read more

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

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<F> Send for Shared<F>

impl<F> Sync for Shared<F>