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 27 28
use core::{
future::Future,
pin::Pin,
};
use crate::internal::base::{
context::Context,
protocol::{
Protocol,
ProviderEndpoint,
},
};
pub type Session<P> = PartialSession<(), P>;
pub struct PartialSession<C, A>
where
A: Protocol,
C: Context,
{
pub(crate) executor: Box<
dyn FnOnce(
C::Endpoints,
ProviderEndpoint<A>,
) -> Pin<Box<dyn Future<Output = ()> + Send>>
+ Send,
>,
}