Struct jsonrpc_client_core::example::ExampleRpcClient
[−]
[src]
pub struct ExampleRpcClient<T: Transport> { /* fields omitted */ }
Just an example RPC client to showcase how to use the jsonrpc_client macro and what
the resulting structs look like.
Methods
impl<T: Transport> ExampleRpcClient<T>[src]
fn new(transport: T) -> Self[src]
Creates a new RPC client backed by the given transport implementation.
fn nullary(&mut self) -> RpcRequest<()>[src]
A method without any arguments and with no return value. Can still of course have lots of side effects on the server where it executes.
fn echo(&mut self, input: &str) -> RpcRequest<String>[src]
Send a string to the server and it will presumably echo it back.
fn concat(&mut self, arg0: String, arg1: u64) -> RpcRequest<String>[src]
Example RPC method named "concat" that takes a String and an unsigned integer and
returns a String. From the name one could guess it will concatenate the two
arguments. But that of course depends on the server where this call is sent.