[][src]Trait web3::DuplexTransport

pub trait DuplexTransport: Transport {
    type NotificationStream: Stream<Item = Value, Error = Error>;
    fn subscribe(&self, id: &SubscriptionId) -> Self::NotificationStream;
fn unsubscribe(&self, id: &SubscriptionId); }

A transport implementation supporting pub sub subscriptions.

Associated Types

type NotificationStream: Stream<Item = Value, Error = Error>

The type of stream this transport returns

Loading content...

Required methods

fn subscribe(&self, id: &SubscriptionId) -> Self::NotificationStream

Add a subscription to this transport

fn unsubscribe(&self, id: &SubscriptionId)

Remove a subscription from this transport

Loading content...

Implementors

impl DuplexTransport for Ipc[src]

type NotificationStream = Box<dyn Stream<Item = Value, Error = Error> + Send + 'static>

impl DuplexTransport for WebSocket[src]

type NotificationStream = Box<dyn Stream<Item = Value, Error = Error> + Send + 'static>

impl<A, B, AStream, BStream> DuplexTransport for EitherTransport<A, B> where
    A: DuplexTransport<NotificationStream = AStream>,
    B: DuplexTransport<NotificationStream = BStream>,
    A::Out: 'static,
    B::Out: 'static,
    AStream: Stream<Item = Value, Error = Error> + 'static,
    BStream: Stream<Item = Value, Error = Error> + 'static, 
[src]

type NotificationStream = Box<dyn Stream<Item = Value, Error = Error>>

impl<X, T: ?Sized> DuplexTransport for X where
    T: DuplexTransport,
    X: Deref<Target = T>,
    X: Debug,
    X: Clone
[src]

Loading content...