Struct jsonrpc_client_core::ExampleRpcClient
[−]
[src]
pub struct ExampleRpcClient<E, T> where
E: Error + Send + 'static,
T: Transport<E>, { /* 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<E: Error + Send + 'static, T: Transport<E>> ExampleRpcClient<E, T>[src]
fn new(transport: T) -> Self
Creates a new RPC client backed by the given transport implementation.
fn nullary(&mut self) -> Result<()>
A method without any arguments and with a null return value. Can still of course have lots of side effects on the server where it executes.
fn echo(&mut self, input: String) -> Result<String>
fn concat(&mut self, arg0: String, arg1: u64) -> Result<String>
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.