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. - Client
Driver - 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.
- Server
Notifications - 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§
- Request
Error - An error handed back from [
Client::request()
]. - Response
Error - An error returned from trying to deserialize the response.
Type Aliases§
- Client
Driver Error - An error was encountered while receiving messages from the backend.