Skip to main content

EthFilterApiClient

Trait EthFilterApiClient 

Source
pub trait EthFilterApiClient<T>: ClientT
where T: RpcObject + Send + Sync + 'static + DeserializeOwned,
{ // Provided methods fn new_filter( &self, filter: Filter, ) -> impl Future<Output = Result<FilterId, Error>> + Send { ... } fn new_block_filter( &self, ) -> impl Future<Output = Result<FilterId, Error>> + Send { ... } fn new_pending_transaction_filter( &self, kind: Option<PendingTransactionFilterKind>, ) -> impl Future<Output = Result<FilterId, Error>> + Send { ... } fn filter_changes( &self, id: FilterId, ) -> impl Future<Output = Result<FilterChanges<T>, Error>> + Send { ... } fn filter_logs( &self, id: FilterId, ) -> impl Future<Output = Result<Vec<Log>, Error>> + Send { ... } fn uninstall_filter( &self, id: FilterId, ) -> impl Future<Output = Result<bool, Error>> + Send { ... } fn logs( &self, filter: Filter, ) -> impl Future<Output = Result<Vec<Log>, Error>> + Send { ... } }
Expand description

Client implementation for the EthFilterApi RPC API.

Provided Methods§

Source

fn new_filter( &self, filter: Filter, ) -> impl Future<Output = Result<FilterId, Error>> + Send

Creates a new filter and returns its id.

Source

fn new_block_filter( &self, ) -> impl Future<Output = Result<FilterId, Error>> + Send

Creates a new block filter and returns its id.

Source

fn new_pending_transaction_filter( &self, kind: Option<PendingTransactionFilterKind>, ) -> impl Future<Output = Result<FilterId, Error>> + Send

Creates a pending transaction filter and returns its id.

Source

fn filter_changes( &self, id: FilterId, ) -> impl Future<Output = Result<FilterChanges<T>, Error>> + Send

Returns all filter changes since last poll.

Source

fn filter_logs( &self, id: FilterId, ) -> impl Future<Output = Result<Vec<Log>, Error>> + Send

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

Source

fn uninstall_filter( &self, id: FilterId, ) -> impl Future<Output = Result<bool, Error>> + Send

Uninstalls filter.

Source

fn logs( &self, filter: Filter, ) -> impl Future<Output = Result<Vec<Log>, Error>> + Send

Returns logs matching given filter object.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<TypeJsonRpseeInternal, T> EthFilterApiClient<T> for TypeJsonRpseeInternal
where T: RpcObject + Send + Sync + 'static + DeserializeOwned, TypeJsonRpseeInternal: ClientT,