pub struct Client { /* private fields */ }
Expand description
A JSON-RPC client.
Create a new Client using one of the transport-specific constructors:
- Client::simple_http for the built-in bare-minimum HTTP transport
Implementations
Creates a new client with the given transport.
Builds a request.
To construct the arguments, one can use one of the shorthand methods [jsonrpc::arg] or [jsonrpc::try_arg].
Sends a request to a client
Sends a batch of requests to the client. The return vector holds the response for the request at the corresponding index. If no response was provided, it’s None.
Note that the requests need to have valid IDs, so it is advised to create the requests with [build_request].