1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use crate::internal::base::*;

pub trait RunCont<C, A>
where
  C: Context,
  A: Protocol,
{
  type Ret;

  fn run_cont(
    self,
    cont: PartialSession<C, A>,
  ) -> Self::Ret;
}

pub fn run_cont<Runner, C, A>(
  runner: Runner,
  cont: PartialSession<C, A>,
) -> Runner::Ret
where
  C: Context,
  A: Protocol,
  Runner: RunCont<C, A>,
{
  runner.run_cont(cont)
}