Skip to main content

ferrite_session/internal/session/
step.rs

1use std::future::Future;
2
3use crate::internal::base::*;
4
5pub fn step<C, A>(
6  cont1: impl Future<Output = PartialSession<C, A>> + Send + 'static
7) -> PartialSession<C, A>
8where
9  C: Context,
10  A: Protocol,
11{
12  unsafe_create_session(move |ins, sender| async move {
13    let cont2 = cont1.await;
14
15    unsafe_run_session(cont2, ins, sender).await;
16  })
17}