Trait pyo3_asyncio::generic::LocalContextExt
source · 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§
sourcefn scope_local<F, R>(
locals: TaskLocals,
fut: F
) -> Pin<Box<dyn Future<Output = R>>>where
F: Future<Output = R> + 'static,
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