pub struct SessionServerConnector<C, LF, DF> { /* private fields */ }Expand description
Accepts connections from a Listener L and serves them with a dispatch,
speaking codec C, under a logical scheme.
Two factories keep it transport- and protocol-agnostic:
listener_factoryruns atbuildtime and returnsDbResult<L>, so the bind happens there and any error surfaces synchronously frombuild.dispatch_factoryturns the live&AimDbinto anArc<dyn Dispatch>(e.g. anAimxDispatch), so the spine never names a concrete protocol.
Implementations§
Source§impl<C, LF, DF> SessionServerConnector<C, LF, DF>
impl<C, LF, DF> SessionServerConnector<C, LF, DF>
Sourcepub fn new(
listener_factory: LF,
codec: C,
dispatch_factory: DF,
config: SessionConfig,
) -> Self
pub fn new( listener_factory: LF, codec: C, dispatch_factory: DF, config: SessionConfig, ) -> Self
Build a server connector. listener_factory binds the listener at
build time; dispatch_factory produces the per-server dispatch from the
live db. The scheme defaults to "remote".
Trait Implementations§
Source§impl<L, C, LF, DF> ConnectorBuilder for SessionServerConnector<C, LF, DF>
impl<L, C, LF, DF> ConnectorBuilder for SessionServerConnector<C, LF, DF>
Source§fn build<'a>(
&'a self,
db: &'a AimDb,
) -> Pin<Box<dyn Future<Output = DbResult<Vec<Pin<Box<dyn Future<Output = ()> + Send + 'static>>>>> + Send + 'a>>
fn build<'a>( &'a self, db: &'a AimDb, ) -> Pin<Box<dyn Future<Output = DbResult<Vec<Pin<Box<dyn Future<Output = ()> + Send + 'static>>>>> + Send + 'a>>
Build the connector and return its driving futures. Read more
Source§fn owns_scheme(&self) -> bool
fn owns_scheme(&self) -> bool
Whether registering a second connector under this scheme is an error. Read more
Auto Trait Implementations§
impl<C, LF, DF> Freeze for SessionServerConnector<C, LF, DF>
impl<C, LF, DF> RefUnwindSafe for SessionServerConnector<C, LF, DF>
impl<C, LF, DF> Send for SessionServerConnector<C, LF, DF>
impl<C, LF, DF> Sync for SessionServerConnector<C, LF, DF>
impl<C, LF, DF> Unpin for SessionServerConnector<C, LF, DF>
impl<C, LF, DF> UnsafeUnpin for SessionServerConnector<C, LF, DF>
impl<C, LF, DF> UnwindSafe for SessionServerConnector<C, LF, DF>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more