Struct promising_future::FutureStream
[−]
[src]
pub struct FutureStream<T: Send> { // some fields omitted }
Stream of multiple Future
s
A FutureStream
can be used to wait for multiple Future
s, and return them incrementally as
they are resolved.
It implements an iterator over completed Future
s, and can be constructed from an iterator of
Future
s.
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 Future
s.
fn poll(&mut self) -> Option<Future<T>>
Return any resolved Future
s, but don't wait for more to resolve.
fn wait(&mut self) -> Option<Future<T>>
Return resolved Future
s. Blocks if there are outstanding Futures
which are not yet
resolved. Returns None
when there are no more outstanding Future
s.
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