Struct jsonrpsee_core::client::async_client::Client
source · [−]pub struct Client { /* private fields */ }
async-client
and async-wasm-client
and client
only.Expand description
Generic asynchronous client.
Implementations
sourceimpl Client
impl Client
sourcepub fn is_connected(&self) -> bool
pub fn is_connected(&self) -> bool
Checks if the client is connected to the target.
Trait Implementations
sourceimpl ClientT for Client
impl ClientT for Client
sourcefn 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
'a: 'async_trait,
'life0: 'async_trait,
Self: '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
'a: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Send a notification request
sourcefn 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,
'a: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
Self: '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,
'a: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Send a method call request.
sourcefn 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,
'a: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
Self: '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,
'a: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Send a batch request. Read more
sourceimpl SubscriptionClientT for Client
impl SubscriptionClientT for Client
sourcefn 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,
'a: 'async_trait,
N: 'async_trait,
'life0: 'async_trait,
Self: '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,
'a: 'async_trait,
N: 'async_trait,
'life0: 'async_trait,
Self: '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.
sourcefn 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,
'a: 'async_trait,
N: 'async_trait,
'life0: 'async_trait,
Self: '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,
'a: 'async_trait,
N: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Subscribe to a specific method.
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more