Struct jsonrpsee_core::client::async_client::Client
source · pub struct Client { /* private fields */ }
Expand description
Generic asynchronous client.
Implementations§
Trait Implementations§
source§impl ClientT for Client
impl ClientT for Client
source§fn notification<'a, 'life0, 'async_trait>(
&'life0 self,
method: &'a str,
params: Option<ParamsSer<'a>>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
fn notification<'a, 'life0, 'async_trait>(
&'life0 self,
method: &'a str,
params: Option<ParamsSer<'a>>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
Send a notification request
source§fn request<'a, 'life0, 'async_trait, R>(
&'life0 self,
method: &'a str,
params: Option<ParamsSer<'a>>
) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>>where
R: DeserializeOwned + 'async_trait,
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
fn request<'a, 'life0, 'async_trait, R>(
&'life0 self,
method: &'a str,
params: Option<ParamsSer<'a>>
) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>>where
R: DeserializeOwned + 'async_trait,
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
Send a method call request.
source§fn batch_request<'a, 'life0, 'async_trait, R>(
&'life0 self,
batch: Vec<(&'a str, Option<ParamsSer<'a>>)>
) -> Pin<Box<dyn Future<Output = Result<Vec<R>, Error>> + Send + 'async_trait>>where
R: DeserializeOwned + Default + Clone + 'async_trait,
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
fn batch_request<'a, 'life0, 'async_trait, R>(
&'life0 self,
batch: Vec<(&'a str, Option<ParamsSer<'a>>)>
) -> Pin<Box<dyn Future<Output = Result<Vec<R>, Error>> + Send + 'async_trait>>where
R: DeserializeOwned + Default + Clone + 'async_trait,
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
Send a batch request. Read more
source§impl SubscriptionClientT for Client
impl SubscriptionClientT for Client
source§fn subscribe<'a, 'life0, 'async_trait, N>(
&'life0 self,
subscribe_method: &'a str,
params: Option<ParamsSer<'a>>,
unsubscribe_method: &'a str
) -> Pin<Box<dyn Future<Output = Result<Subscription<N>, Error>> + Send + 'async_trait>>where
N: DeserializeOwned + 'async_trait,
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
fn subscribe<'a, 'life0, 'async_trait, N>(
&'life0 self,
subscribe_method: &'a str,
params: Option<ParamsSer<'a>>,
unsubscribe_method: &'a str
) -> Pin<Box<dyn Future<Output = Result<Subscription<N>, Error>> + Send + 'async_trait>>where
N: DeserializeOwned + 'async_trait,
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
Send a subscription request to the server.
The subscribe_method
and params
are used to ask for the subscription towards the
server. The unsubscribe_method
is used to close the subscription.
source§fn subscribe_to_method<'a, 'life0, 'async_trait, N>(
&'life0 self,
method: &'a str
) -> Pin<Box<dyn Future<Output = Result<Subscription<N>, Error>> + Send + 'async_trait>>where
N: DeserializeOwned + 'async_trait,
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
fn subscribe_to_method<'a, 'life0, 'async_trait, N>(
&'life0 self,
method: &'a str
) -> Pin<Box<dyn Future<Output = Result<Subscription<N>, Error>> + Send + 'async_trait>>where
N: DeserializeOwned + 'async_trait,
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
Subscribe to a specific method.