Macro rpc_toolkit::rpc_handler
source · 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 forcommand
. Must implement Clone.status_fn
(optional): a function that takes a JSON RPC error code (i32
) and returns a StatusCode- default:
|_| StatusCode::OK
- default: