Struct tokio_jsonrpc::endpoint::Client [] [src]

pub struct Client { /* fields omitted */ }

The client part of the endpoint.

This can be used to call RPCs and send notifications to the other end. There's no direct constructor, it is created through the Endpoint.

Methods

impl Client
[src]

Call a RPC.

Construct an RPC message and send it to the other end. It returns a future that resolves once the message is sent. It yields the Client back (it is blocked for the time of sending) and another future that resolves once the answer is received (or once a timeout happens, in which case the result is None).

Send a notification.

It creates a notification message and sends it. It returs a future that resolves once the message is sent and yields the client back for further use.

Get the server control.

That allows terminating the server, etc.

Trait Implementations

impl Clone for Client
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more