Trait tendermint_rpc::SubscriptionClient [−][src]
A client that exclusively provides Event
subscription capabilities,
without any other RPC method support.
Required methods
#[must_use]fn subscribe<'life0, 'async_trait>(
&'life0 self,
query: Query
) -> Pin<Box<dyn Future<Output = Result<Subscription>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
query: Query
) -> Pin<Box<dyn Future<Output = Result<Subscription>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
/subscribe
: subscribe to receive events produced by the given query.
#[must_use]fn unsubscribe<'life0, 'async_trait>(
&'life0 self,
query: Query
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
query: Query
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
/unsubscribe
: unsubscribe from events relating to the given query.
This method is particularly useful when you want to terminate multiple
Subscription
s to the same Query
simultaneously, or if you’ve
joined multiple Subscription
s together using select_all
and you
no longer have access to the individual Subscription
instances to
terminate them separately.
fn close(self) -> Result<()>
[src]
Subscription clients will usually have long-running underlying transports that will need to be closed at some point.
Implementors
impl SubscriptionClient for WebSocketClient
[src]
fn subscribe<'life0, 'async_trait>(
&'life0 self,
query: Query
) -> Pin<Box<dyn Future<Output = Result<Subscription>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
query: Query
) -> Pin<Box<dyn Future<Output = Result<Subscription>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn unsubscribe<'life0, 'async_trait>(
&'life0 self,
query: Query
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
query: Query
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn close(self) -> Result<()>
[src]
impl<M: MockRequestMatcher> SubscriptionClient for MockClient<M>
[src]
fn subscribe<'life0, 'async_trait>(
&'life0 self,
query: Query
) -> Pin<Box<dyn Future<Output = Result<Subscription>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
query: Query
) -> Pin<Box<dyn Future<Output = Result<Subscription>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn unsubscribe<'life0, 'async_trait>(
&'life0 self,
query: Query
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
query: Query
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,