Struct exonum_jsonrpc::client::Client
[−]
[src]
pub struct Client { /* fields omitted */ }
A handle to a remote JSONRPC server
Methods
impl Client
[src]
fn new<S: Into<String>>(url: S, user: Option<S>, pass: Option<S>) -> Client
Creates a new client
Examples
use jsonrpc_v1::client::Client; let client = Client::new(String::from("www.example.org"), None, None);
Panics
This function panics if you provide a password without an username.
fn send_request(&self, request: &Request) -> Result<Response, Error>
Sends a request to a client
fn build_request(&self, name: String, params: Vec<Value>) -> Request
Builds a request
fn last_nonce(&self) -> u64
Accessor for the last-used nonce
fn url(&self) -> &str
Returns rpc url
fn password(&self) -> &Option<String>
Returns rpc password
fn username(&self) -> &Option<String>
Returns rpc username