Trait async_jsonrpc_client::PubsubTransport [−][src]
A JSON-RPC 2.0 transport supporting subscriptions.
Associated Types
type NotificationStream: Stream<Item = SubscriptionNotification>
[src]
The subscription stream.
Required methods
#[must_use]fn subscribe<'life0, 'async_trait, M>(
&'life0 self,
subscribe_method: M,
unsubscribe_method: M,
params: Option<Params>
) -> Pin<Box<dyn Future<Output = Result<(Id, Self::NotificationStream), ClientError>> + Send + 'async_trait>> where
M: Into<String> + Send,
M: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
subscribe_method: M,
unsubscribe_method: M,
params: Option<Params>
) -> Pin<Box<dyn Future<Output = Result<(Id, Self::NotificationStream), ClientError>> + Send + 'async_trait>> where
M: Into<String> + Send,
M: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Add a subscription to this transport
#[must_use]fn unsubscribe<'life0, 'async_trait, M>(
&'life0 self,
unsubscribe_method: M,
subscription_id: Id
) -> Pin<Box<dyn Future<Output = Result<bool, ClientError>> + Send + 'async_trait>> where
M: Into<String> + Send,
M: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
unsubscribe_method: M,
subscription_id: Id
) -> Pin<Box<dyn Future<Output = Result<bool, ClientError>> + Send + 'async_trait>> where
M: Into<String> + Send,
M: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Remove a subscription from this transport