macro_rules! box_fut { ($code:block) => { ... }; }
Expand description
Create a pinned future, compatible with crate::RetFut
.
ยงExamples
This creates a future which prints Hello world!
and awaits it.
let fut = box_fut!({
println!("Hello world!");
});
fut.await;