ferrite_session/internal/session/
forward.rs1use crate::internal::base::{
2 unsafe_create_session,
3 Context,
4 ContextLens,
5 Empty,
6 EmptyContext,
7 PartialSession,
8 Protocol,
9};
10
11pub fn forward<N, C, A>(_: N) -> PartialSession<C, A>
12where
13 A: Protocol,
14 C: Context,
15 N::Target: EmptyContext,
16 N: ContextLens<C, A, Empty>,
17{
18 unsafe_create_session::<C, A, _, _>(move |ctx, provider_end| async move {
19 let (client_end, _) = N::extract_source(ctx);
20 A::forward(client_end.get_applied(), provider_end).await;
21 })
22}