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§
sourcefn new_filter(&self, filter: Filter) -> Result<U256, ErrorObject<'static>>
fn new_filter(&self, filter: Filter) -> Result<U256, ErrorObject<'static>>
Returns id of new filter.
sourcefn new_block_filter(&self) -> Result<U256, ErrorObject<'static>>
fn new_block_filter(&self) -> Result<U256, ErrorObject<'static>>
Returns id of new block filter.
sourcefn new_pending_transaction_filter(&self) -> Result<U256, ErrorObject<'static>>
fn new_pending_transaction_filter(&self) -> Result<U256, ErrorObject<'static>>
Returns id of new block filter.
sourcefn 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_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.
sourcefn 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 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’).
sourcefn uninstall_filter(&self, index: Index) -> Result<bool, ErrorObject<'static>>
fn uninstall_filter(&self, index: Index) -> Result<bool, ErrorObject<'static>>
Uninstalls filter.
Provided Methods§
Object Safety§
This trait is not object safe.