rpc!() { /* proc-macro */ }Expand description
Procedural macro rpc! – transforms async functions and methods into
remote‑callable RPC endpoints.
The macro walks every item inside the supplied block:
- Async functions/methods become RPC handlers plus forwarding stubs.
- Structs are renamed and wrapped in
ObjectReftype aliases. - Impl blocks are duplicated into trait definitions so both concrete
instances and their
ObjectRefstubs implement the same API.
Items annotated with #[local] are passed through unchanged, allowing
authors to mix local utilities and remote calls within the same block.
See the crate‑level docs for a full usage example.