jsonrpc_pubsub

Trait SubscribeRpcMethod

Source
pub trait SubscribeRpcMethod<M: PubSubMetadata>:
    Send
    + Sync
    + 'static {
    // Required method
    fn call(&self, params: Params, meta: M, subscriber: Subscriber);
}
Expand description

Subscribe handler

Required Methods§

Source

fn call(&self, params: Params, meta: M, subscriber: Subscriber)

Called when client is requesting new subscription to be started.

Implementors§

Source§

impl<M, F> SubscribeRpcMethod<M> for F
where F: Fn(Params, M, Subscriber) + Send + Sync + 'static, M: PubSubMetadata,