Expand description
JSON-RPC envelope → RpcApi::dispatch adapter.
Given a raw JsonRpcRequest<serde_json::Value> and an impl RpcApi,
produce a fully-formed JsonRpcResponse<serde_json::Value> suitable for
return to the client. Wraps:
- The method-not-found check (via the method registry).
- The
RpcApi::dispatchcall itself, which the API implementor owns. - Panic catching (converts panics to
InternalErrorenvelopes). - The response-envelope assembly (success vs error body).
Functions§
- dispatch_
envelope - Top-level dispatch.
- error_
envelope - Build an error envelope by-hand. Useful for middleware that rejects before dispatch runs (rate limit, unknown role, etc.).