Skip to main content

Module compat

Module compat 

Source
Expand description

Compatibility layer similar to Rust async-compat that allows non-Tokio runtimes to use Tokio-based implementations of the core traits, such as the ObjectStore implementations.

This works in the same way as async-compat, by either pulling a Tokio runtime from the current context, or by creating a new global single-thread Tokio runtime if one is not found.

We cannot use async-compat directly because we need to wrap Streams as well as Futures, and async-compat only supports the latter.

Structsยง

Compat
Compatibility adapter for futures and I/O types.