[−][src]Trait ethers_providers::JsonRpcClient
Trait which must be implemented by data transports to be used with the Ethereum JSON-RPC provider.
Associated Types
type Error: Error + Into<ProviderError>
[src]
A JSON-RPC Error
Required methods
#[must_use]pub fn request<'life0, 'life1, 'async_trait, T, R>(
&'life0 self,
method: &'life1 str,
params: T
) -> Pin<Box<dyn Future<Output = Result<R, Self::Error>> + Send + 'async_trait>> where
T: Debug + Serialize + Send + Sync,
R: Serialize + DeserializeOwned,
T: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
method: &'life1 str,
params: T
) -> Pin<Box<dyn Future<Output = Result<R, Self::Error>> + Send + 'async_trait>> where
T: Debug + Serialize + Send + Sync,
R: Serialize + DeserializeOwned,
T: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sends a request with the provided JSON-RPC and parameters serialized as JSON
Implementations on Foreign Types
impl<'a, U: 'a + JsonRpcClient + ?Sized> JsonRpcClient for &'a U where
&'a U: Debug + Send + Sync,
[src]
&'a U: Debug + Send + Sync,
type Error = U::Error
pub fn request<'life0, 'life1, 'async_trait, T, R>(
&'life0 self,
method: &'life1 str,
params: T
) -> Pin<Box<dyn Future<Output = Result<R, Self::Error>> + Send + 'async_trait>> where
T: Debug + Serialize + Send + Sync,
R: Serialize + DeserializeOwned,
T: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
method: &'life1 str,
params: T
) -> Pin<Box<dyn Future<Output = Result<R, Self::Error>> + Send + 'async_trait>> where
T: Debug + Serialize + Send + Sync,
R: Serialize + DeserializeOwned,
T: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
impl<U: JsonRpcClient + ?Sized> JsonRpcClient for Box<U> where
Box<U>: Debug + Send + Sync,
[src]
Box<U>: Debug + Send + Sync,
type Error = U::Error
pub fn request<'life0, 'life1, 'async_trait, T, R>(
&'life0 self,
method: &'life1 str,
params: T
) -> Pin<Box<dyn Future<Output = Result<R, Self::Error>> + Send + 'async_trait>> where
T: Debug + Serialize + Send + Sync,
R: Serialize + DeserializeOwned,
T: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
method: &'life1 str,
params: T
) -> Pin<Box<dyn Future<Output = Result<R, Self::Error>> + Send + 'async_trait>> where
T: Debug + Serialize + Send + Sync,
R: Serialize + DeserializeOwned,
T: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
impl<U: JsonRpcClient + ?Sized> JsonRpcClient for Arc<U> where
Arc<U>: Debug + Send + Sync,
[src]
Arc<U>: Debug + Send + Sync,
type Error = U::Error
pub fn request<'life0, 'life1, 'async_trait, T, R>(
&'life0 self,
method: &'life1 str,
params: T
) -> Pin<Box<dyn Future<Output = Result<R, Self::Error>> + Send + 'async_trait>> where
T: Debug + Serialize + Send + Sync,
R: Serialize + DeserializeOwned,
T: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
method: &'life1 str,
params: T
) -> Pin<Box<dyn Future<Output = Result<R, Self::Error>> + Send + 'async_trait>> where
T: Debug + Serialize + Send + Sync,
R: Serialize + DeserializeOwned,
T: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Implementors
impl JsonRpcClient for Provider
[src]
type Error = ClientError
pub fn request<'life0, 'life1, 'async_trait, T: Serialize + Send + Sync, R: DeserializeOwned>(
&'life0 self,
method: &'life1 str,
params: T
) -> Pin<Box<dyn Future<Output = Result<R, ClientError>> + Send + 'async_trait>> where
T: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
method: &'life1 str,
params: T
) -> Pin<Box<dyn Future<Output = Result<R, ClientError>> + Send + 'async_trait>> where
T: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sends a POST request with the provided method and the params serialized as JSON over HTTP
impl JsonRpcClient for MockProvider
[src]
type Error = MockError
pub fn request<'life0, 'life1, 'async_trait, T: Serialize + Send + Sync, R: DeserializeOwned>(
&'life0 self,
method: &'life1 str,
input: T
) -> Pin<Box<dyn Future<Output = Result<R, MockError>> + Send + 'async_trait>> where
T: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
method: &'life1 str,
input: T
) -> Pin<Box<dyn Future<Output = Result<R, MockError>> + Send + 'async_trait>> where
T: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Pushes the (method, input)
to the back of the requests
queue,
pops the responses from the back of the responses
queue
impl JsonRpcClient for Ws
[src]
type Error = ClientError
pub fn request<'life0, 'life1, 'async_trait, T: Serialize + Send + Sync, R: DeserializeOwned>(
&'life0 self,
method: &'life1 str,
params: T
) -> Pin<Box<dyn Future<Output = Result<R, ClientError>> + Send + 'async_trait>> where
T: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
method: &'life1 str,
params: T
) -> Pin<Box<dyn Future<Output = Result<R, ClientError>> + Send + 'async_trait>> where
T: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,