Struct promising_future::FutureStream [] [src]

pub struct FutureStream<T: Send> { /* fields omitted */ }

Stream of multiple Futures

A FutureStream can be used to wait for multiple Futures, and return them incrementally as they are resolved.

It implements an iterator over completed Futures, and can be constructed from an iterator of Futures.

May be cloned and the clones passed to other threads so that Futures may be added from multiple threads.

Methods

impl<T: Send> FutureStream<T>
[src]

Add a Future to the stream.

Return number of outstanding Futures.

Return a singleton FutureStreamWaiter. If one already exists, block until it is released.

Return a singleton FutureStreamWaiter. Returns None if one already exists.

Return a resolved Future if any, but don't wait for more to resolve.

Return resolved Futures. Blocks if there are outstanding Futures which are not yet resolved. Returns None when there are no more outstanding Futures.

Trait Implementations

impl<T: Clone + Send> Clone for FutureStream<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a, T: Send + 'a> IntoIterator for &'a FutureStream<T>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl<T: Send + 'static> FromIterator<Future<T>> for FutureStream<T>
[src]

Creates a value from an iterator. Read more