macro_rules! completion_async_move {
($($tt:tt)*) => { ... };
}Available on crate features
macro and std only.Expand description
A bang macro to generate completion async move blocks.
These async blocks evaluate to a CompletionFuture, and you can .await other
CompletionFutures inside of them.
See also [completion_async!] for more details.
ยงExamples
use completion::{FutureExt, completion_async_move, future};
let fut = completion_async_move! {
let fut = async { 3 };
let completion_fut = async { 5 }.into_completion();
fut.await + completion_fut.await
};
assert_eq!(future::block_on(fut), 8);