Crate await [] [src]

Core primitives for building asynchronous stuff

This is Proposal A

This prposal is based on the idea of adding a single Await trait to the core. The Await trait would provide a common abstraction over things that we could resume from.

In the following example (with compiler support):

pub **async** fn my_code() {
    // code block A
    let x = **await** some_func()
    // code block B
}

the expectation is that "code block B" will be resumed whenever the await'ing of some_func returns.

For now, without compiler support, it would look like:

pub fn my_code() {
    // code block A
    let x = some_func().await()
    // code block B
}

Modules

examples

Examples on crates representing different Async abstractions

io

Traits defining Asynchronous IO

Structs

AwaitValue

When they need an Await<T> and there is no need to wait

Traits

Await

Represents then notion of something that we could have to await for.

AwaitBox

AwaitBox is a version of the Await intended for use with boxed objects.