pub struct RpcClient { /* private fields */ }
Implementations§
Source§impl RpcClient
impl RpcClient
pub fn new( url: &str, user: Option<String>, password: Option<String>, retry: bool, backup_urls: Vec<String>, ) -> Self
pub async fn execute<T: for<'a> Deserialize<'a>>( &self, method: &str, params: &[Value], ) -> Result<T, Error>
pub async fn send_request( &self, request: &RpcRequest, ) -> Result<RpcResponse, Error>
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