Skip to main content

dispatch_envelope

Function dispatch_envelope 

Source
pub async fn dispatch_envelope<R: RpcApi + ?Sized>(
    req: JsonRpcRequest<Value>,
    api: &R,
    registry: &MethodRegistry,
) -> JsonRpcResponse<Value>
Expand description

Top-level dispatch.

Attempts the call under a catch_unwind so that a panic in a handler returns InternalError rather than tearing down the worker thread.