Expand description

The traits exposed by this crate.

Structs

A framework agnostic BlockingHandle type. This is returned by SpawnBlocking. Await this handle for the output of the task. As opposed to a JoinHandle, you can’t cancel a blocking task once it has started running. If you drop this after the task starts running, it will just detach and let the task run in the background.

A framework agnostic JoinHandle type. Cancels the future on dropping the handle. You can call detach to leave the future running when dropping the handle.

A timeout returned by TimerExt::timeout.

An error value given when a function times out.

Future returned by YieldNow::yield_now.

Traits

This is similar to SpawnHandle except that it allows spawning !Send futures. Please see the docs on SpawnHandle.

Lets you spawn a !Send future and get a JoinHandle to await the output of a future.

Indicate the executor can provide a threadpool for blocking operations. There is two methods of this trait. One of them requires boxing the closure and the other is not object safe.

Lets you spawn and get a JoinHandle to await the output of a future.

Convenience trait for passing in a generic future to SpawnHandle. Much akin to Spawn and SpawnExt in the futures library.

Represents the fact that an executor has timer functionality.

An extension trait on Timer for timeouts and clock delays.

Trait indicating that tokio IO can be used with the executor that implements it. Currently this can be enabled through features on TokioCt, TokioTp, AsyncGlobal and AsyncStd.

Trait indicating that tasks can yield to the executor. This put’s the current task at the back of the schedulers queue, giving other tasks a chance to run.