Trait EthFilterApiClient

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§

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

Creates a new filter and returns its id.

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

Creates a new block filter and returns its id.

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.

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

Returns all filter changes since last poll.

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’).

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

Uninstalls filter.

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", so this trait is not object safe.

Implementors§

§

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