pub struct Client { /* private fields */ }
Available on crate feature
reqwest
only.Expand description
Implementations§
Source§impl Client
impl Client
Sourcepub fn with_client(url: Url, client: Client) -> Self
pub fn with_client(url: Url, client: Client) -> Self
Constructor for a Client
from a reqwest::Client
that was already initialized.
Sourcepub async fn call<P: TryToParams, R: TryFromValue>(
&self,
method: &str,
args: P,
) -> Result<R, ClientError>
pub async fn call<P: TryToParams, R: TryFromValue>( &self, method: &str, args: P, ) -> Result<R, ClientError>
Sourcepub async fn multicall<P: TryToParams>(
&self,
calls: Vec<(String, P)>,
) -> Result<Vec<Result<Value, Fault>>, ClientError>
Available on crate feature multicall
only.
pub async fn multicall<P: TryToParams>( &self, calls: Vec<(String, P)>, ) -> Result<Vec<Result<Value, Fault>>, ClientError>
multicall
only.Asynchronous method for handling “system.multicall” calls.
Note: This method does not check if the number of method calls matches the number of returned results.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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