macro_rules! ipc_impl_forward_async_trait {
(
impl $trait:ident for $ty:ty {
$(
async fn $name:ident(
&self $(, $arg:ident : $arg_ty:ty )* $(,)?
) -> $ret:ty => $target:ident;
)+
}
) => { ... };
}Expand description
Generate an async_trait impl that forwards each method to a local
async method on self.
This is intended for service clients that have already defined the IPC
methods (often via ipc_client_postcard_method! or
ipc_peer_proxied_postcard_method!) and just need to implement the
corresponding ctb_utilities::ipc::service_traits::*ClientTrait.
Example:
ipc_impl_forward_async_trait!(
impl RuntimeClientTrait for RuntimeClient {
async fn start(&self, document: Vec<u8>) -> Result<()> => start_ipc;
}
);