pub async fn run_multi<F>(builder_fn: F) -> Result<(), CellError>Expand description
Run a multi-service cell
This function handles all the boilerplate for a multi-service cell.
The builder function receives a DispatcherBuilder to configure which
services the cell exposes.
§Example
ⓘ
use rapace_cell::{run_multi, DispatcherBuilder, ServiceDispatch};
use rapace::{Frame, RpcError};
use std::future::Future;
use std::pin::Pin;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
run_multi(|builder| {
builder
.add_service(MyServiceServer::new(()))
.add_service(AnotherServiceServer::new(()))
}).await?;
Ok(())
}