[][src]Struct jsonrpc_pubsub::PubSubHandler

pub struct PubSubHandler<T: PubSubMetadata, S: Middleware<T> = Noop> { /* fields omitted */ }

Publish-Subscribe extension of IoHandler.

Methods

impl<T: PubSubMetadata, S: Middleware<T>> PubSubHandler<T, S>[src]

pub fn new(handler: MetaIoHandler<T, S>) -> Self[src]

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>, 
[src]

Adds new subscription.

Trait Implementations

impl<T: PubSubMetadata> Default for PubSubHandler<T>[src]

impl<T: PubSubMetadata, S: Middleware<T>> Into<MetaIoHandler<T, S>> for PubSubHandler<T, S>[src]

impl<T: PubSubMetadata, S: Middleware<T>> Deref for PubSubHandler<T, S>[src]

type Target = MetaIoHandler<T, S>

The resulting type after dereferencing.

impl<T: PubSubMetadata, S: Middleware<T>> DerefMut for PubSubHandler<T, S>[src]

Auto Trait Implementations

impl<T, S> Unpin for PubSubHandler<T, S> where
    S: Unpin

impl<T, S> Sync for PubSubHandler<T, S>

impl<T, S> Send for PubSubHandler<T, S>

impl<T, S = Noop> !UnwindSafe for PubSubHandler<T, S>

impl<T, S = Noop> !RefUnwindSafe for PubSubHandler<T, S>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]