macro_rules! ipc_dispatch_postcard_service {
(
router: $router:expr,
request: $request:expr,
service_field: $service_field:ident,
service_name: $service_name:expr,
methods: {
$(
$method_id:pat => $decode_label:literal => $req_ty:ty => $svc_method:ident
),+ $(,)?
}
) => { ... };
}Expand description
Generate a postcard service dispatcher.
This expands to:
- service availability checks via
router.check_service, - request decoding via
router.decode_request, - calling the service method and piping through
router.handle_service_call.
The macro is intentionally small and explicit: you still list each method, but you don’t repeat the same decode/handle scaffolding for every service.