macro_rules! ipc_client_postcard_method {
(
$(#[$meta:meta])*
$vis:vis async fn $name:ident(
&self $(, $arg:ident : $arg_ty:ty )* $(,)?
) -> $ret:ty {
service: $service_name:expr,
method: $method_name:expr,
request: $req_expr:expr,
response: $resp_ty:ty,
map: |$resp:ident| $map_expr:expr $(,)?
}
) => { ... };
}Expand description
Generate a simple postcard-based IPC client method.
This is intended for the common case where a client method:
- constructs a request DTO,
- calls
ChildProcess::call_postcard, - maps the decoded response to the return value.
More complex IPC paths (data plane, FD transfer, streaming) should remain hand-written.