Crate task_local

Source
Expand description

Task-local storage for asynchronous tasks.

This crate provides a way to store task-local values across .await points. It was extracted from the tokio::task_local module and can be used independently of the Tokio runtime.

Macros§

task_local
Declares a new task-local key of type LocalKey.

Structs§

AccessError
An error returned by LocalKey::try_with.
LocalKey
A key for task-local data.
TaskLocalFuture
A future that sets a value T of a task local for the future F during its execution.