Struct jsonrpc_pubsub::PubSubHandler [−][src]
pub struct PubSubHandler<T: PubSubMetadata, S: Middleware<T> = Noop> { /* fields omitted */ }
Expand description
Publish-Subscribe extension of IoHandler
.
Implementations
Creates new PubSubHandler
pub fn add_subscription<F, G>(
&mut self,
notification: &str,
subscribe: (&str, F),
unsubscribe: (&str, G)
) where
F: SubscribeRpcMethod<T>,
G: UnsubscribeRpcMethod<T>,
pub fn add_subscription<F, G>(
&mut self,
notification: &str,
subscribe: (&str, F),
unsubscribe: (&str, G)
) where
F: SubscribeRpcMethod<T>,
G: UnsubscribeRpcMethod<T>,
Adds new subscription.