jsonrpc_pubsub

Trait UnsubscribeRpcMethod

Source
pub trait UnsubscribeRpcMethod<M>:
    Send
    + Sync
    + 'static {
    type Out: Future<Output = Result<Value>> + Send + 'static;

    // Required method
    fn call(&self, id: SubscriptionId, meta: Option<M>) -> Self::Out;
}
Expand description

Unsubscribe handler

Required Associated Types§

Source

type Out: Future<Output = Result<Value>> + Send + 'static

Output type

Required Methods§

Source

fn call(&self, id: SubscriptionId, meta: Option<M>) -> Self::Out

Called when client is requesting to cancel existing subscription.

Metadata is not available if the session was closed without unsubscribing.

Implementors§

Source§

impl<M, F, I> UnsubscribeRpcMethod<M> for F
where F: Fn(SubscriptionId, Option<M>) -> I + Send + Sync + 'static, I: Future<Output = Result<Value>> + Send + 'static,

Source§

type Out = I