Module futures_util::future [−][src]
Asynchronous values.
This module contains:
- The
Futuretrait. - The
FutureExtandTryFutureExttrait, 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, andready, which constructs a future with an immediate defined value.
Re-exports
pub use core::future::Future; |
Structs
| AndThen | Future for the |
| ErrInto | Future for the |
| Flatten | Future for the |
| FlattenStream | Stream for the |
| Fuse | Future for the |
| FutureObj | A custom trait object for polling futures, roughly akin to
|
| Inspect | Future for the |
| InspectErr | Future for the |
| InspectOk | Future for the |
| IntoFuture | Future for the |
| IntoStream | Stream for the |
| Join | Future for the |
| Join3 | Future for the |
| Join4 | Future for the |
| Join5 | Future for the |
| Lazy | Future for the |
| LocalFutureObj | A custom trait object for polling futures, roughly akin to
|
| Map | Future for the |
| MapErr | Future for the |
| MapInto | Future for the |
| MapOk | Future for the |
| MapOkOrElse | Future for the |
| NeverError | Future for the |
| OkInto | Future for the |
| OptionFuture | A future representing a value which may or may not be present. |
| OrElse | Future for the |
| Pending | Future for the |
| PollFn | Future for the |
| Ready | Future for the |
| Select | Future for the |
| Then | Future for the |
| TryFlatten | Future for the |
| TryFlattenStream | Future for the |
| TryJoin | Future for the |
| TryJoin3 | Future for the |
| TryJoin4 | Future for the |
| TryJoin5 | Future for the |
| TrySelect | Future for the |
| UnitError | Future for the |
| UnwrapOrElse | Future for the |
Enums
| Either | Combines two different futures, streams, or sinks having the same associated types into a single type. |
| MaybeDone | A future that may have completed. |
| TryMaybeDone | A future that may have completed with an error. |
Traits
| FusedFuture | A future which tracks whether or not the underlying future should no longer be polled. |
| FutureExt | An extension trait for |
| TryFuture | A convenience for futures that return |
| TryFutureExt | Adapters specific to |
| UnsafeFutureObj | A custom implementation of a future trait object for |
Functions
| err | Create a future that is immediately ready with an error value. |
| join | Joins the result of two futures, waiting for them both to complete. |
| join3 | Same as |
| join4 | Same as |
| join5 | Same as |
| lazy | Creates a new future that allows delayed execution of a closure. |
| maybe_done | Wraps a future into a |
| ok | Create a future that is immediately ready with a success value. |
| pending | Creates a future which never resolves, representing a computation that never finishes. |
| poll_fn | Creates a new future wrapping around a function returning |
| ready | Creates a future that is immediately ready with a value. |
| select | Waits for either one of two differently-typed futures to complete. |
| try_join | Joins the result of two futures, waiting for them both to complete or for one to produce an error. |
| try_join3 | Same as |
| try_join4 | Same as |
| try_join5 | Same as |
| try_maybe_done | Wraps a future into a |
| try_select | Waits for either one of two differently-typed futures to complete. |