[][src]Module futures_util::future

Futures

This module contains a number of functions for working with Futures, including the FutureExt trait which adds methods to Future types.

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.

CatchUnwind

Future for the catch_unwind method.

Flatten

Future for the flatten method.

FlattenStream

Stream for the flatten_stream method.

Fuse

Future for the fuse method.

Inspect

Future for the inspect 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.

Map

Future for the map method.

NeverError

Future for the never_error combinator.

OptionFuture

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

Pending

Future for the pending() function.

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.

Select

Future for the select() function.

SelectAll

Future for the select_all function.

Shared

Future for the shared method.

Then

Future for the then method.

UnitError

Future for the unit_error combinator.

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.

Traits

FusedFuture

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

Future

A future represents an asynchronous computation.

FutureExt

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

Functions

abortable

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

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.

pending

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

poll_fn

Creates a new future wrapping around a function returning Poll.

ready

Create a future that is immediately ready with a value.

select

Waits for either one of two differently-typed futures to complete.

select_all

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

Type Definitions

BoxFuture

An owned dynamically typed Future for use in cases where you can't statically type your result or need to add some indirection.

LocalBoxFuture

BoxFuture, but without the Send requirement.