switch-resume 0.1.3

Delimited async continuations
Documentation
1
2
3
4
5
6
7
8
9
fn main() {
    futures::executor::block_on(async {
        switch_resume::run(|task| async move {
            let three = task.switch(|resume| async move { resume(1).await }).await + 2;
            assert_eq!(three, 3);
        })
        .await;
    });
}