1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::future::Future;

use crate::internal::base::*;

pub fn step<C, A>(
  cont1: impl Future<Output = PartialSession<C, A>> + Send + 'static
) -> PartialSession<C, A>
where
  C: Context,
  A: Protocol,
{
  unsafe_create_session(move |ins, sender| async move {
    let cont2 = cont1.await;

    unsafe_run_session(cont2, ins, sender).await;
  })
}