Trait ethers_providers::PubsubClient[][src]

pub trait PubsubClient: JsonRpcClient {
    type NotificationStream: Stream<Item = Value>;
    fn subscribe<T: Into<U256>>(
        &self,
        id: T
    ) -> Result<Self::NotificationStream, Self::Error>;
fn unsubscribe<T: Into<U256>>(&self, id: T) -> Result<(), Self::Error>; }

A transport implementation supporting pub sub subscriptions.

Associated Types

type NotificationStream: Stream<Item = Value>[src]

The type of stream this transport returns

Loading content...

Required methods

fn subscribe<T: Into<U256>>(
    &self,
    id: T
) -> Result<Self::NotificationStream, Self::Error>
[src]

Add a subscription to this transport

fn unsubscribe<T: Into<U256>>(&self, id: T) -> Result<(), Self::Error>[src]

Remove a subscription from this transport

Loading content...

Implementors

impl PubsubClient for Ws[src]

type NotificationStream = UnboundedReceiver<Value>

Loading content...