Module futures::future [] [src]

Futures

This module contains the Future trait and a number of adaptors for this trait. See the crate docs, and the docs for Future, for full detail.

Structs

AndThen

Future for the and_then combinator, chaining a computation onto the end of another future which completes successfully.

CatchUnwind

Future for the catch_unwind combinator.

Empty

A future which is never resolved.

Err

A future representing a finished but erroneous computation.

Flatten

Future for the flatten combinator, flattening a future-of-a-future to get just the result of the final future.

FlattenStream

Future for the flatten_stream combinator, flattening a future-of-a-stream to get just the result of the final stream as a stream.

Fuse

A future which "fuse"s a future once it's been resolved.

FutureResult

A future representing a value that is immediately ready.

IntoStream

Future that forwards one element from the underlying future (whether it is success of error) and emits EOF after that.

Join

Future for the join combinator, waiting for two futures to complete.

Join3

Future for the join3 combinator, waiting for three futures to complete.

Join4

Future for the join4 combinator, waiting for four futures to complete.

Join5

Future for the join5 combinator, waiting for five futures to complete.

JoinAll

A future which takes a list of futures and resolves with a vector of the completed values.

Lazy

A future which defers creation of the actual future until a callback is scheduled.

Map

Future for the map combinator, changing the type of a future.

MapErr

Future for the map_err combinator, changing the error type of a future.

Ok

A future representing a finished successful computation.

OrElse

Future for the or_else combinator, chaining a computation onto the end of a future which fails with an error.

Select

Future for the select combinator, waiting for one of two futures to complete.

SelectAll

Future for the select_all combinator, waiting for one of any of a list of futures to complete.

SelectNext

Future yielded as the second result in a Select future.

SelectOk

Future for the select_ok combinator, waiting for one of any of a list of futures to succesfully complete. unlike select_all, this future ignores all but the last error, if there are any.

Then

Future for the then combinator, chaining computations on the end of another future regardless of its outcome.

Traits

Future

Trait for types which are a placeholder of a value that will become available at possible some later point in time.

IntoFuture

Class of types which can be converted themselves into a future.

Functions

empty

Creates a future which never resolves, representing a computation that never finishes.

err

Creates a "leaf future" from an immediate value of a failed computation.

join_all

Creates a future which represents a collection of the results of the futures given.

lazy

Creates a new future which will eventually be the same as the one created by the closure provided.

ok

Creates a "leaf future" from an immediate value of a finished and successful computation.

result

Creates a new "leaf future" which will resolve with the given result.

select_all

Creates a new future which will select over a list of futures.

select_ok

Creates a new future which will select the first successful future over a list of futures.

Type Definitions

BoxFuture

A type alias for Box<Future + Send>