Crate thin_jsonrpc_client

Source
Expand description

§thin-jsonrpc-client

This crate provides a lightweight JSON-RPC compatible client.

Modules§

backend
The backend trait, to connect a client to some server.
params
Helpers to build parameters for a JSON-RPC request.
raw_response
JSON-RPC response types.

Macros§

params
Construct positional/array parameters for a JSON-RPC Call.

Structs§

Client
A JSON-RPC client. Build this by calling Client::from_backend() and providing a suitable sender and receiver.
ClientDriver
This must be polled in order to accept messages from the server. Nothing will happen unless it is. This design allows us to apply backpressure (by polling this less often), and allows us to drive multiple notification streams without requiring any specific async runtime. It will return:
Response
A JSON-RPC response.
ServerNotifications
A struct representing messages from the server. This implements futures_util::Stream and provides a couple of additional helper methods to further filter the stream.

Enums§

RequestError
An error handed back from [Client::request()].
ResponseError
An error returned from trying to deserialize the response.

Type Aliases§

ClientDriverError
An error was encountered while receiving messages from the backend.