1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use crate::internal::base::{
  unsafe_create_session,
  Context,
  ContextLens,
  Empty,
  EmptyContext,
  PartialSession,
  Protocol,
};

pub fn forward<N, C, A>(_: N) -> PartialSession<C, A>
where
  A: Protocol,
  C: Context,
  N::Target: EmptyContext,
  N: ContextLens<C, A, Empty>,
{
  unsafe_create_session::<C, A, _, _>(move |ctx, provider_end| async move {
    let (client_end, _) = N::extract_source(ctx);
    A::forward(client_end.get_applied(), provider_end).await;
  })
}