[][src]Struct jsonrpc_pubsub::typed::Subscriber

pub struct Subscriber<T, E = Error> { /* fields omitted */ }

New PUB-SUB subscriber.

Methods

impl<T, E> Subscriber<T, E>[src]

pub fn new(subscriber: Subscriber) -> Self[src]

Wrap non-typed subscriber.

pub fn new_test<M: Into<String>>(
    method: M
) -> (Self, Receiver<Result<SubscriptionId, Error>>, Receiver<String>)
[src]

Create new subscriber for tests.

pub fn reject(self, error: Error) -> Result<(), ()>[src]

Reject subscription with given error.

pub fn assign_id(self, id: SubscriptionId) -> Result<Sink<T, E>, ()>[src]

Assign id to this subscriber. This method consumes Subscriber and returns Sink if the connection is still open or error otherwise.

Trait Implementations

impl<T: Debug, E: Debug> Debug for Subscriber<T, E>[src]

Auto Trait Implementations

impl<T, E> Send for Subscriber<T, E> where
    E: Send,
    T: Send

impl<T, E> Sync for Subscriber<T, E> where
    E: Sync,
    T: Sync

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Erased for T