pub struct JsonRpcClient(/* private fields */);Expand description
Jsonrpc v2.0 client state machine.
Implementations§
Source§impl JsonRpcClient
impl JsonRpcClient
Sourcepub fn new(max_send_queue_size: usize) -> Self
pub fn new(max_send_queue_size: usize) -> Self
Create a new JsonRpcClient with provided send cache channel length.
Sourcepub async fn call<M, P, R>(&self, method: M, params: P) -> Result<R>
pub async fn call<M, P, R>(&self, method: M, params: P) -> Result<R>
Invoke a jsonrpc v2.0 call and waiting for response.
Sourcepub fn to_state(&self) -> JsonRpcClientState
pub fn to_state(&self) -> JsonRpcClientState
Get the inner JsonRpcClientState instance.