macro_rules! ipc_impl_ipc_ext_async_trait {
(
impl $trait:ident for $ty:ty {
$(
async fn $name:ident(
&self $(, $arg:ident : $arg_ty:ty )* $(,)?
) -> $ret:ty => $ext_trait:ident ( $( $call_arg:expr ),* $(,)? );
)+
}
) => { ... };
}Expand description
Generate an async_trait impl where each method calls an IPC client
extension trait generated by #[ipc_method].
This supports the common ergonomic pattern where the public client trait
takes borrowed inputs (like &str), while the IPC layer uses owned types.
Currently, &str arguments are converted to String via .to_string().
Example:
ipc_impl_ipc_ext_async_trait!(
impl NetworkClientTrait for NetworkClient {
async fn fetch(&self, url: &str) -> Result<Vec<u8>>
=> FetchIpcClientExt(url.to_string());
}
);