Module task

Module task 

Source
Expand description

Components for constructing asynchronous computations which will be returned from Endpoints.

The main trait in this module is Task. This trait is an abstraction of asynchronous computations which will be returned from endpoints. The role of this trait is very close to futures and hence its design intentionally resembles Future. However, some differences are exist for specializing to the purpose of HTTP handling.

This trait does not provide any combinators for composing complicate computations. Such combinations are usually performed indirectly by the endpoints or by wrapping the value of Future.

Structs§

Abort
A Task which will immediately abort with an error value of E.
Context
The contextual information during polling an task.
Ready
A Task which will immediately return a value of T.
TaskFuture
A helper struct which wraps a Future and provides the implementation of Task.

Traits§

IntoTask
Trait representing the conversion to a Task.
Task
Trait representing the asynchronous computation after applying the endpoints.

Functions§

abort
Create a task which will immediately abort the computation with an error value of E.
future
Create a task from a Future.
ready
Create a task which will immediately return a value of T.