Skip to main content

EthSubscriptions

Trait EthSubscriptions 

Source
pub trait EthSubscriptions: RpcNodeCore + EthApiTypes<RpcConvert: RpcConvert<Primitives = Self::Primitives>> {
    // Provided methods
    fn log_stream(
        &self,
        filter: Filter,
    ) -> impl Stream<Item = Log> + Send + Unpin { ... }
    fn header_stream(
        &self,
    ) -> impl Stream<Item = RpcHeader<Self::NetworkTypes>> + Send + Unpin { ... }
    fn transaction_receipts_stream(
        &self,
        filter: TransactionReceiptsParams,
    ) -> impl Stream<Item = Vec<RpcReceipt<Self::NetworkTypes>>> + Send + Unpin { ... }
}
Expand description

Provides streams subscriptions for eth_subscribe.

Override the default methods to inject additional data sources (e.g. flashblocks).

Provided Methods§

Source

fn log_stream(&self, filter: Filter) -> impl Stream<Item = Log> + Send + Unpin

Returns a stream that yields matching logs from canonical chain updates.

Source

fn header_stream( &self, ) -> impl Stream<Item = RpcHeader<Self::NetworkTypes>> + Send + Unpin

Returns a stream that yields new block headers from canonical chain updates.

Source

fn transaction_receipts_stream( &self, filter: TransactionReceiptsParams, ) -> impl Stream<Item = Vec<RpcReceipt<Self::NetworkTypes>>> + Send + Unpin

Returns a stream that yields matching transaction receipts from canonical chain updates.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§