Expand description

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

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

Future for the catch_unwind combinator.

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

A future representing a value that is immediately ready.

A future which is never resolved.

A future representing a value that is immediately ready.

Errors returned from the Spawn::spawn function.

A future representing a value that is immediately ready.

A future representing a value that is immediately ready.

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

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

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

A future which “fuses” a future once it’s been resolved.

A future representing a value that is immediately ready.

Do something with the item of a future, passing it on.

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

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

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

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

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

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

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

A future implementing a tail-recursive loop.

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

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

A future representing a value that is immediately ready.

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

A future which adapts a function returning Poll.

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

Future for the select2 combinator, waiting for one of two differently-typed futures to complete.

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

Future yielded as the second result in a Select future.

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

A future that is cloneable and can be polled in multiple threads. Use Future::shared() method to convert any future into a Shared future.

A wrapped error of the original future that is cloneable and implements Deref for ease of use.

A wrapped item of the original future that is cloneable and implements Deref for ease of use.

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

Enums

Combines two different futures yielding the same item and error types into a single type.

Kinds of errors that can be returned from the Execute::spawn function.

The status of a loop_fn loop.

Traits

A trait for types which can spawn fresh futures.

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

Asynchronous conversion from a type T.

Class of types which can be converted into a future.

Functions

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

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

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

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

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

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

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

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

Creates a new future implementing a tail-recursive loop.

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

Creates a new future wrapping around a function returning Poll.

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

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

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