rpc_handler!() { /* proc-macro */ }
Expand description

rpc_handler!(command, context, status_fn)

  • returns: RpcHandler
  • command: path to an rpc command (with the #[command] attribute)
  • context: The Context for command. Must implement Clone.
  • status_fn (optional): a function that takes a JSON RPC error code (i32) and returns a StatusCode
    • default: |_| StatusCode::OK