pub struct Client { /* private fields */ }
Expand description

A JSON-RPC client.

Create a new Client using one of the transport-specific constructors:

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].

Make a request and deserialize the response.

To construct the arguments, one can use one of the shorthand methods [jsonrpc::arg] or [jsonrpc::try_arg].

Create a new JSON-RPC client using a bare-minimum HTTP transport.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.