run_with_session

Function run_with_session 

Source
pub async fn run_with_session<F, S>(factory: F) -> Result<(), CellError>
where F: FnOnce(Arc<RpcSession>) -> S, S: ServiceDispatch,
Expand description

Run a single-service cell, but let the service factory access the RpcSession.

This variant is useful for cells that need to make outgoing RPC calls during setup. It starts the demux loop in a background task before invoking factory.