[−][src]Trait web3::DuplexTransport
A transport implementation supporting pub sub subscriptions.
Associated Types
type NotificationStream: Stream<Item = Value>
The type of stream this transport returns
Required methods
fn subscribe(&self, id: SubscriptionId) -> Result<Self::NotificationStream>
Add a subscription to this transport
fn unsubscribe(&self, id: SubscriptionId) -> Result<()>
Remove a subscription from this transport
Implementors
impl DuplexTransport for WebSocket
[src]
type NotificationStream = UnboundedReceiver<Value>
fn subscribe(&self, id: SubscriptionId) -> Result<Self::NotificationStream>
[src]
fn unsubscribe(&self, id: SubscriptionId) -> Result
[src]
impl<A, B, AStream, BStream> DuplexTransport for Either<A, B> where
A: DuplexTransport<NotificationStream = AStream>,
B: DuplexTransport<NotificationStream = BStream>,
A::Out: 'static + Send,
B::Out: 'static + Send,
AStream: Stream<Item = Value> + 'static + Send,
BStream: Stream<Item = Value> + 'static + Send,
[src]
A: DuplexTransport<NotificationStream = AStream>,
B: DuplexTransport<NotificationStream = BStream>,
A::Out: 'static + Send,
B::Out: 'static + Send,
AStream: Stream<Item = Value> + 'static + Send,
BStream: Stream<Item = Value> + 'static + Send,
type NotificationStream = BoxStream<'static, Value>
fn subscribe(&self, id: SubscriptionId) -> Result<Self::NotificationStream>
[src]
fn unsubscribe(&self, id: SubscriptionId) -> Result
[src]
impl<X, T: ?Sized> DuplexTransport for X where
T: DuplexTransport,
X: Deref<Target = T>,
X: Debug,
X: Clone,
[src]
T: DuplexTransport,
X: Deref<Target = T>,
X: Debug,
X: Clone,