Crate tangle

Source
Expand description

A lightweight futures package inspired by Scala. The goals are to provide a simple interface for creating futures and, most importantly, composing multiple asynchronous actions together. Thus, all futures return Async<T, E> which is an asynchronous equivalent to Result<T, E>, the only difference being that an extra variant Continue(Future<T, E>) allows for composition.

Re-exports§

pub use Async::Continue;

Macros§

async
compose
compose!(future! { err!(123) })
err
future
Create a Future with a slightly nicer syntax.
ok
ok!(123)

Structs§

Future
A value that will be resolved sometime into the future, asynchronously. Futures use an internal threadpool to handle asynchronous tasks.
Promise

Enums§

Async
Asynchronous version of Result<T, E> that allows for future composition. Additional macros are provided to work with both Async<T, E> and Result<T, E>.
PromiseState