Trait fc_rpc::EthFilterApiServer

source ·
pub trait EthFilterApiServer:
    Sized
    + Send
    + Sync
    + 'static {
    // Required methods
    fn new_filter(&self, filter: Filter) -> Result<U256, ErrorObject<'static>>;
    fn new_block_filter(&self) -> Result<U256, ErrorObject<'static>>;
    fn new_pending_transaction_filter(
        &self,
    ) -> Result<U256, ErrorObject<'static>>;
    fn filter_changes<'life0, 'async_trait>(
        &'life0 self,
        index: Index,
    ) -> 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,
        index: Index,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Log>, ErrorObject<'static>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn uninstall_filter(
        &self,
        index: Index,
    ) -> Result<bool, ErrorObject<'static>>;
    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(&self, filter: Filter) -> Result<U256, ErrorObject<'static>>

Returns id of new filter.

source

fn new_block_filter(&self) -> Result<U256, ErrorObject<'static>>

Returns id of new block filter.

source

fn new_pending_transaction_filter(&self) -> Result<U256, ErrorObject<'static>>

Returns id of new block filter.

source

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

Returns filter changes since last poll.

source

fn filter_logs<'life0, 'async_trait>( &'life0 self, index: Index, ) -> 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(&self, index: Index) -> Result<bool, ErrorObject<'static>>

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<B, C, BE, P> EthFilterApiServer for EthFilter<B, C, BE, P>
where B: BlockT, C: ProvideRuntimeApi<B> + HeaderBackend<B> + StorageProvider<B, BE> + 'static, C::Api: EthereumRuntimeRPCApi<B>, BE: Backend<B> + 'static, P: TransactionPool<Block = B, Hash = B::Hash> + 'static,