pub struct RpcClient { /* private fields */ }Expand description
Thin wrapper around a transport for making RPC calls
Implementations§
Source§impl RpcClient
impl RpcClient
Sourcepub fn from_transport(inner: Arc<dyn TransportTrait>) -> Self
pub fn from_transport(inner: Arc<dyn TransportTrait>) -> Self
Wrap an existing transport (no URL+auth dance)
Sourcepub async fn call_method(
&self,
method: &str,
params: &[Value],
) -> Result<Value, TransportError>
pub async fn call_method( &self, method: &str, params: &[Value], ) -> Result<Value, TransportError>
Call a JSON-RPC method
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RpcClient
impl !RefUnwindSafe for RpcClient
impl Send for RpcClient
impl Sync for RpcClient
impl Unpin for RpcClient
impl !UnwindSafe for RpcClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more