pub fn on<Fut: Future>(future: Fut) -> Async<Fut> ⓘ
Wraps the given Future with Async.
Future
Async
use futures_executor::block_on; let a = async { 40 }; let b = async { 2 }; let result = async { (async_ops::on(a) + b).await }; assert_eq!(42, block_on(result));