Skip to main content

EthSubscriptions

Trait EthSubscriptions 

Source
pub trait EthSubscriptions: RpcNodeCore + EthApiTypes
where Self::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 = <Self::NetworkTypes as RpcTypes>::Header> + Send + Unpin { ... } fn transaction_receipts_stream( &self, filter: TransactionReceiptsParams, ) -> impl Stream<Item = Vec<<Self::NetworkTypes as RpcTypes>::Receipt>> + 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 = <Self::NetworkTypes as RpcTypes>::Header> + 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<<Self::NetworkTypes as RpcTypes>::Receipt>> + 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§

Source§

impl<N, Rpc> EthSubscriptions for EthApi<N, Rpc>
where N: RpcNodeCore, Rpc: RpcConvert<Primitives = <N as RpcNodeCore>::Primitives, Error = EthApiError>,