Module futures::future
[−]
[src]
Asynchronous values.
This module contains:
-
The
Futuretrait. -
The
FutureExttrait, which provides adapters for chaining and composing futures. -
Top-level future combinators like
lazywhich creates a future from a closure that defines its return value, andresult, which constructs a future with an immediate defined value.
Structs
| AndThen |
Future for the |
| CatchUnwind |
Future for the |
| Empty |
A future which is never resolved. |
| ErrInto |
Future for the |
| Flatten |
Future for the |
| FlattenStream |
Future for the |
| Fuse |
A future which "fuses" a future once it's been resolved. |
| FutureOption |
A future representing a value which may or may not be present. |
| FutureResult |
A future representing a value that is immediately ready. |
| Inspect |
Do something with the item of a future, passing it on. |
| IntoStream |
A type which converts a |
| Join |
Future for the |
| Join3 |
Future for the |
| Join4 |
Future for the |
| Join5 |
Future for the |
| 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 the future
is |
| LoopFn |
A future implementing a tail-recursive loop. |
| Map |
Future for the |
| MapErr |
Future for the |
| OrElse |
Future for the |
| PollFn |
A future which adapts a function returning |
| Select |
Future for the |
| SelectAll |
Future for the |
| SelectOk |
Future for the |
| Shared |
A future that is cloneable and can be polled in multiple threads.
Use |
| SharedError |
A wrapped error of the original future that is cloneable and implements Deref for ease of use. |
| SharedItem |
A wrapped item of the original future that is cloneable and implements Deref for ease of use. |
| Then |
Future for the |
Enums
| Either |
The enum |
| Loop |
An enum describing whether to |
Traits
| Future |
A future represents an asychronous computation that may fail. |
| FutureExt |
An extension trait for |
| IntoFuture |
Types that can be converted into a future. |
Functions
| empty |
Creates a future which never resolves, representing a computation that never finishes. |
| err |
Creates a new future that will immediately fail with the given error. |
| 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. |
| loop_fn |
Creates a new future implementing a tail-recursive loop. |
| ok |
Creates a new future that will immediately resolve successfully to the given value. |
| poll_fn |
Creates a new future wrapping around a function returning |
| result |
Creates a new future that will immediate 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. |