grafos_rpc_service

Attribute Macro grafos_rpc_service 

#[grafos_rpc_service]
Expand description

Attribute macro that generates RPC client and server from a service trait.

Each method in the trait gets a sequential method_id starting from 0. The generated client serializes arguments with postcard and calls through the transport. The generated server dispatches by method_id.

ยงConstraints

  • Methods must take &self as the first argument.
  • All other arguments and the return type must implement serde::Serialize and serde::Deserialize.
  • Methods return T (not Result<T>); the transport layer handles errors.