pub type SyncMethod = Arc<dyn Fn(Id<'_>, Params<'_>, usize, Extensions) -> MethodResponse + Sync + Send>;
Expand description
A MethodCallback
is an RPC endpoint, callable with a standard JSON-RPC request,
implemented as a function pointer to a Fn
function taking four arguments:
the id
, params
, a channel the function uses to communicate the result (or error)
back to jsonrpsee
, and the connection ID (useful for the websocket transport).
Aliased Typeยง
struct SyncMethod { /* private fields */ }