Module iface

Module iface 

Source
Expand description

The traits exposed by this crate.

Structs§

BlockingHandle
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.
JoinHandle
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.
Timeout
A timeout returned by TimerExt::timeout.
TimeoutError
An error value given when a function times out.
YieldNowFut
Future returned by YieldNow::yield_now.

Traits§

LocalSpawnHandle
This is similar to SpawnHandle except that it allows spawning !Send futures. Please see the docs on SpawnHandle.
LocalSpawnHandleExt
Lets you spawn a !Send future and get a JoinHandle to await the output of a future.
SpawnBlocking
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.
SpawnHandle
Lets you spawn and get a JoinHandle to await the output of a future.
SpawnHandleExt
Convenience trait for passing in a generic future to SpawnHandle. Much akin to Spawn and SpawnExt in the futures library.
Timer
Represents the fact that an executor has timer functionality.
TimerExt
An extension trait on Timer for timeouts and clock delays.
TokioIo
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.
YieldNow
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.