Trait reth::rpc::api::servers::eth::filter::EthFilterApiServer

source ·
pub trait EthFilterApiServer: Sized + Send + Sync + 'static {
    // Required methods
    fn new_filter<'life0, 'async_trait>(
        &'life0 self,
        filter: Filter,
    ) -> Pin<Box<dyn Future<Output = Result<FilterId, ErrorObject<'static>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn new_block_filter<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<FilterId, ErrorObject<'static>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn new_pending_transaction_filter<'life0, 'async_trait>(
        &'life0 self,
        kind: Option<PendingTransactionFilterKind>,
    ) -> Pin<Box<dyn Future<Output = Result<FilterId, ErrorObject<'static>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn filter_changes<'life0, 'async_trait>(
        &'life0 self,
        id: FilterId,
    ) -> Pin<Box<dyn Future<Output = Result<FilterChanges, ErrorObject<'static>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn filter_logs<'life0, 'async_trait>(
        &'life0 self,
        id: FilterId,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Log>, ErrorObject<'static>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn uninstall_filter<'life0, 'async_trait>(
        &'life0 self,
        id: FilterId,
    ) -> Pin<Box<dyn Future<Output = Result<bool, ErrorObject<'static>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn logs<'life0, 'async_trait>(
        &'life0 self,
        filter: Filter,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Log>, ErrorObject<'static>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;

    // Provided method
    fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description

Server trait implementation for the EthFilterApi RPC API.

Required Methods§

source

fn new_filter<'life0, 'async_trait>( &'life0 self, filter: Filter, ) -> Pin<Box<dyn Future<Output = Result<FilterId, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Creates anew filter and returns its id.

source

fn new_block_filter<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<FilterId, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Creates a new block filter and returns its id.

source

fn new_pending_transaction_filter<'life0, 'async_trait>( &'life0 self, kind: Option<PendingTransactionFilterKind>, ) -> Pin<Box<dyn Future<Output = Result<FilterId, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Creates a pending transaction filter and returns its id.

source

fn filter_changes<'life0, 'async_trait>( &'life0 self, id: FilterId, ) -> Pin<Box<dyn Future<Output = Result<FilterChanges, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Returns all filter changes since last poll.

source

fn filter_logs<'life0, 'async_trait>( &'life0 self, id: FilterId, ) -> Pin<Box<dyn Future<Output = Result<Vec<Log>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Returns all logs matching given filter (in a range ‘from’ - ‘to’).

source

fn uninstall_filter<'life0, 'async_trait>( &'life0 self, id: FilterId, ) -> Pin<Box<dyn Future<Output = Result<bool, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Uninstalls filter.

source

fn logs<'life0, 'async_trait>( &'life0 self, filter: Filter, ) -> Pin<Box<dyn Future<Output = Result<Vec<Log>, ErrorObject<'static>>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Returns logs matching given filter object.

Provided Methods§

source

fn into_rpc(self) -> RpcModule<Self>

Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<Provider, Pool> EthFilterApiServer for EthFilter<Provider, Pool>
where Provider: BlockReader + BlockIdReader + EvmEnvProvider + 'static, Pool: TransactionPool + 'static,