Step

fn step<C, A>(
  cont: impl Future< Output = PartialSession<C, A>>
) -> PartialSession<C, A>
  • Wraps an async block yielding a PartialSession.

Example:

  use std::time::Duration;

  use tokio::time::sleep;

  let p: Session<End> = step(async move {
    sleep(Duration::from_secs(1)).await;
    terminate()
  });