Module tokio_util::context

source ·
Available on crate feature rt only.
Expand description

Tokio context aware futures utilities.

This module includes utilities around integrating tokio with other runtimes by allowing the context to be attached to futures. This allows spawning futures on other executors while still using tokio to drive them. This can be useful if you need to use a tokio based library in an executor/runtime that does not provide a tokio context.

Structs§

  • TokioContext allows running futures that must be inside Tokio’s context on a non-Tokio runtime.

Traits§

  • Extension trait that simplifies bundling a Handle with a Future.