Module future

Source
Expand description

Asynchronous functionality.

Extends: std::{future, task}


See also the fundamental async and await keywords and the async book.

Macros§

task_ready
core Extracts the successful type of a TaskPoll<T>.

Structs§

Coro
Represents a single thread stackless coroutine.
CoroRunalloc
A managed dynamic collection of single-thread Coroutines.
CoroYield
A future that alternates between Ready and Pending status each time it’s polled.
FuturePending
core A future which never resolves, representing a computation that never finishes.
FuturePollFn
core A Future that wraps a function returning TaskPoll.
FutureReady
core A future that is immediately ready with a value.
TaskContext
core The context of an asynchronous task.
TaskRawWaker
core Allows the implementor of a task executor to create a TaskWaker.
TaskRawWakerVTable
core A virtual function pointer table that specifies the behavior of a TaskRawWaker.
TaskWaker
core A handle for waking up a task by notifying its executor that it is ready to be run.

Enums§

TaskPoll
core Indicates whether a value is ready or if the current task is still pending.
CoroutineStateExperimentalnightly_coro
core The result of a coroutine resumption.

Traits§

ExtFuture
Extension trait providing additional methods for Futures.
Future
core An asynchronous computation obtained by use of async.
IntoFuture
core Conversion into a Future.
TaskWakealloc
⚛️ ?alloc The implementation of waking a task on an executor.
CoroutineExperimentalnightly_coro
core The trait implemented by builtin coroutine types.