Struct promising_future::FutureStream
[−]
[src]
pub struct FutureStream<T: Send> { // some 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.
Methods
impl<T: Send> FutureStream<T>[src]
fn new() -> FutureStream<T>
fn add(&mut self, fut: Future<T>)
Add a Future to the stream.
fn outstanding(&self) -> usize
Return number of outstanding Futures.
fn poll(&mut self) -> Option<Future<T>>
Return any resolved Futures, but don't wait for more to resolve.
fn wait(&mut self) -> Option<Future<T>>
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: Send> IntoIterator for FutureStream<T>[src]
type Item = T
The type of the elements being iterated over.
type IntoIter = FutureStreamIter<T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
Creates an iterator from a value. Read more
impl<T: Send> FromIterator<Future<T>> for FutureStream<T>[src]
fn from_iter<I>(iterator: I) -> Self where I: IntoIterator<Item=Future<T>>
Creates a value from an iterator. Read more