pub struct JsonRpcClientState(/* private fields */);Expand description
The jsonrpc client without Drop support.
Implementations§
Source§impl JsonRpcClientState
impl JsonRpcClientState
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 async fn send(&self) -> Result<(usize, Vec<u8>)>
pub async fn send(&self) -> Result<(usize, Vec<u8>)>
Writes a single jsonrpc packet to be sent to the peer.
Trait Implementations§
Source§impl Clone for JsonRpcClientState
impl Clone for JsonRpcClientState
Source§fn clone(&self) -> JsonRpcClientState
fn clone(&self) -> JsonRpcClientState
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for JsonRpcClientState
impl !RefUnwindSafe for JsonRpcClientState
impl Send for JsonRpcClientState
impl Sync for JsonRpcClientState
impl Unpin for JsonRpcClientState
impl !UnwindSafe for JsonRpcClientState
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)