Struct rpc_lib::client::Client [−][src]
pub struct Client<'a> { /* fields omitted */ }
Client contains all information and authentication to hit an RPC server
Methods
impl<'a> Client<'a>
[src]
impl<'a> Client<'a>
pub fn new(url: &'a str) -> Self
[src]
pub fn new(url: &'a str) -> Self
pub fn with_basic_auth(self, username: String, password: Option<String>) -> Self
[src]
pub fn with_basic_auth(self, username: String, password: Option<String>) -> Self
pub fn call<T>(
&self,
id: &'a str,
method: &'a str,
params: impl Serialize
) -> Result<T, Error> where
T: DeserializeOwned,
[src]
pub fn call<T>(
&self,
id: &'a str,
method: &'a str,
params: impl Serialize
) -> Result<T, Error> where
T: DeserializeOwned,