Module jsonrpc_pubsub::manager
source · [−]Expand description
The SubscriptionManager used to manage subscription based RPCs.
The manager provides four main things in terms of functionality:
-
The ability to create unique subscription IDs through the use of the
IdProvider
trait. Two implementations are availble out of the box, aNumericIdProvider
and aRandomStringIdProvider
. -
An executor with which to drive
Future
s to completion. -
A way to add new subscriptions. Subscriptions should come in the form of a
Stream
. These subscriptions will be transformed into notifications by the manager, which can be consumed by the client. -
A way to cancel any currently active subscription.
Structs
Provides a thread-safe incrementing integer which can be used as a subscription ID.
Used to generate random strings for use as subscription IDs.
Subscriptions manager.
Traits
Trait used to provide unique subscription IDs.
Type Definitions
Alias for an implementation of futures::future::Executor
.