[−][src]Trait tokio_compat_02::FutureExt
Trait extension that simplifies bundling a Handle
with a Future
.
Required methods
pub fn compat(self) -> TokioContext<Self>ⓘNotable traits for TokioContext<F>
impl<F: Future> Future for TokioContext<F> type Output = F::Output;
where
Self: Sized,
[src]
Notable traits for TokioContext<F>
impl<F: Future> Future for TokioContext<F> type Output = F::Output;
Self: Sized,
Compat any future into a future that can run within the Tokio 0.2 context.
This will spawn single threaded scheduler in the background globally to allow you to call this extension trait method from anywhere. The background scheduler supports running Tokio 0.2 futures in any context with a small footprint.
Example
use tokio_compat_02::FutureExt as _; my_future().compat().await;
Implementors
impl<F: Future> FutureExt for F
[src]
pub fn compat(self) -> TokioContext<Self>ⓘNotable traits for TokioContext<F>
impl<F: Future> Future for TokioContext<F> type Output = F::Output;
[src]
Notable traits for TokioContext<F>
impl<F: Future> Future for TokioContext<F> type Output = F::Output;