[][src]Module futures::future

Asynchronous values.

This module contains:

Structs

AbortHandle

A handle to a Abortable future.

AbortRegistration

A registration handle for a Abortable future. Values of this type can be acquired from AbortHandle::new and are used in calls to Abortable::new.

Abortable

A future which can be remotely short-circuited using an AbortHandle.

Aborted

Indicator that the Abortable future was aborted.

AndThen

Future for the and_then method.

CatchUnwind

Future for the catch_unwind method.

Empty

Future for the empty function.

ErrInto

Future for the err_into method.

Flatten

Future for the flatten method.

FlattenSink

Future for the flatten_sink method.

FlattenStream

Stream for the flatten_stream method.

Fuse

Future for the fuse method.

FutureObj

A custom trait object for polling futures, roughly akin to Box<dyn Future<Output = T> + Send + 'a>.

Inspect

Future for the inspect method.

IntoFuture

Future for the into_future method.

IntoStream

Stream for the into_stream method.

Join

Future for the join function.

Join3

Future for the join3 function.

Join4

Future for the join4 function.

Join5

Future for the join5 function.

JoinAll

Future for the join_all function.

Lazy

Future for the lazy function.

LocalFutureObj

A custom trait object for polling futures, roughly akin to Box<dyn Future<Output = T> + 'a>.

Map

Future for the map method.

MapErr

Future for the map_err method.

MapOk

Future for the map_ok method.

OptionFuture

A future representing a value which may or may not be present.

OrElse

Future for the or_else method.

PollFn

Future for the poll_fn function.

Ready

Future for the ready function.

Remote

A future which sends its output to the corresponding RemoteHandle. Created by remote_handle.

RemoteHandle

The handle to a remote future returned by remote_handle.

Shared

Future for the shared method.

Then

Future for the then method.

TryJoin

Future for the try_join function.

TryJoin3

Future for the try_join3 function.

TryJoin4

Future for the try_join4 function.

TryJoin5

Future for the try_join5 function.

TryJoinAll

Future for the try_join_all function.

UnwrapOrElse

Future for the unwrap_or_else method.

Enums

MaybeDone

A future that may have completed.

Traits

FusedFuture

A Future or TryFuture which tracks whether or not the underlying future should no longer be polled.

FutureExperimental

A future represents an asynchronous computation.

FutureExt

An extension trait for Futures that provides a variety of convenient adapters.

TryFuture

A convenience for futures that return Result values that includes a variety of adapters tailored to such futures.

TryFutureExt

Adapters specific to Result-returning futures

UnsafeFutureObj

A custom implementation of a future trait object for FutureObj, providing a hand-rolled vtable.

Functions

abortable

Creates a new Abortable future and a AbortHandle which can be used to stop it.

empty

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

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 join, but with more futures.

join4

Same as join, but with more futures.

join5

Same as join, but with more futures.

join_all

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

lazy

Creates a new future that allows delayed execution of a closure.

maybe_done

Wraps a future into a MaybeDone

ok

Create a future that is immediately ready with a success value.

poll_fn

Creates a new future wrapping around a function returning [Poll].

ready

Create a future that is immediately ready with a value.

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_join, but with more futures.

try_join4

Same as try_join, but with more futures.

try_join5

Same as try_join, but with more futures.

try_join_all

Creates a future which represents either a collection of the results of the futures given or an error.