Skip to main content

dispatch

Function dispatch 

Source
pub async fn dispatch<H: RpcHandler + ?Sized>(
    handler: &H,
    surface: Surface,
    req: JsonRpcRequest<Value>,
) -> JsonRpcResponse<Value>
Expand description

Dispatch one JSON-RPC request against handler, arriving on surface.

Always returns a well-formed JsonRpcResponse echoing the request id.