FutureExt

Trait FutureExt 

Source
pub trait FutureExt: Future {
    // Provided method
    fn with_task_local_context(
        self,
        kvs: impl IntoIterator<Item = (String, String)>,
    ) -> impl Future<Output = Self::Output>
       where Self: Sized { ... }
}
Expand description

An extension trait for futures to run them with a task-local context.

See module-level documentation for usage examples.

Provided Methods§

Source

fn with_task_local_context( self, kvs: impl IntoIterator<Item = (String, String)>, ) -> impl Future<Output = Self::Output>
where Self: Sized,

Run a future with a task-local context.

Implementors§

Source§

impl<F: Future> FutureExt for F