pub trait LocalContextExt: Runtime {
    // Required method
    fn scope_local<F, R>(
        locals: TaskLocals,
        fut: F
    ) -> Pin<Box<dyn Future<Output = R>>>
       where F: Future<Output = R> + 'static;
}
Expand description

Adds the ability to scope task-local data for !Send futures

Required Methods§

source

fn scope_local<F, R>( locals: TaskLocals, fut: F ) -> Pin<Box<dyn Future<Output = R>>>where F: Future<Output = R> + 'static,

Set the task locals for the given !Send future

Implementors§