pub trait EthSubscriptions: RpcNodeCore + EthApiTypes<RpcConvert: RpcConvert<Primitives = Self::Primitives>> {
// Provided methods
fn log_stream(
&self,
filter: Filter,
) -> impl Stream<Item = RpcLog<Self::NetworkTypes>> + 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). Register upstream listeners before returning the stream so they can receive events immediately after acknowledgement, even before the first poll.
Provided Methods§
Sourcefn log_stream(
&self,
filter: Filter,
) -> impl Stream<Item = RpcLog<Self::NetworkTypes>> + Send + Unpin
fn log_stream( &self, filter: Filter, ) -> impl Stream<Item = RpcLog<Self::NetworkTypes>> + Send + Unpin
Returns a stream that yields matching logs from canonical chain updates.
Sourcefn header_stream(
&self,
) -> impl Stream<Item = RpcHeader<Self::NetworkTypes>> + Send + Unpin
fn header_stream( &self, ) -> impl Stream<Item = RpcHeader<Self::NetworkTypes>> + Send + Unpin
Returns a stream that yields new block headers from canonical chain updates.
Sourcefn transaction_receipts_stream(
&self,
filter: TransactionReceiptsParams,
) -> impl Stream<Item = Vec<RpcReceipt<Self::NetworkTypes>>> + Send + Unpin
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".