Expand description
The traits exposed by this crate.
Structs§
- Blocking
Handle - A framework agnostic BlockingHandle type. This is returned by
SpawnBlocking
. Await this handle for the output of the task. As opposed to aJoinHandle
, 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. - Join
Handle - 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
. - Timeout
Error - An error value given when a function times out.
- Yield
NowFut - Future returned by
YieldNow::yield_now
.
Traits§
- Local
Spawn Handle - This is similar to
SpawnHandle
except that it allows spawning!Send
futures. Please see the docs onSpawnHandle
. - Local
Spawn Handle Ext - Lets you spawn a
!Send
future and get aJoinHandle
to await the output of a future. - Spawn
Blocking - 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.
- Spawn
Handle - Lets you spawn and get a JoinHandle to await the output of a future.
- Spawn
Handle Ext - Convenience trait for passing in a generic future to
SpawnHandle
. Much akin toSpawn
andSpawnExt
in the futures library. - Timer
- Represents the fact that an executor has timer functionality.
- Timer
Ext - 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
andAsyncStd
. - Yield
Now - 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.