Struct era_test_node::filters::EthFilters
source · pub struct EthFilters { /* private fields */ }
Expand description
Keeps track of installed filters and their respective updates.
Implementations§
source§impl EthFilters
impl EthFilters
sourcepub fn add_block_filter(&mut self) -> Result<U256, &'static str>
pub fn add_block_filter(&mut self) -> Result<U256, &'static str>
Adds a block filter to keep track of new block hashes. Returns the filter id.
sourcepub fn add_log_filter(
&mut self,
from_block: BlockNumber,
to_block: BlockNumber,
addresses: Vec<H160>,
topics: [Option<HashSet<H256>>; 4]
) -> Result<U256, &'static str>
pub fn add_log_filter( &mut self, from_block: BlockNumber, to_block: BlockNumber, addresses: Vec<H160>, topics: [Option<HashSet<H256>>; 4] ) -> Result<U256, &'static str>
Adds a log filter to keep track of new transaction logs. Returns the filter id.
sourcepub fn add_pending_transaction_filter(&mut self) -> Result<U256, &'static str>
pub fn add_pending_transaction_filter(&mut self) -> Result<U256, &'static str>
Adds a filter to keep track of new pending transaction hashes. Returns the filter id.
sourcepub fn remove_filter(&mut self, id: U256) -> bool
pub fn remove_filter(&mut self, id: U256) -> bool
Removes the filter with the given id. Returns true if the filter existed, false otherwise.
sourcepub fn get_new_changes(
&mut self,
id: U256
) -> Result<FilterChanges, &'static str>
pub fn get_new_changes( &mut self, id: U256 ) -> Result<FilterChanges, &'static str>
Retrieves the filter updates with the given id. The updates are reset after this call.
pub fn get_filter(&self, id: U256) -> Option<&FilterType>
sourcepub fn notify_new_block(&mut self, hash: H256)
pub fn notify_new_block(&mut self, hash: H256)
Notify available filters of a newly produced block
sourcepub fn notify_new_pending_transaction(&mut self, hash: H256)
pub fn notify_new_pending_transaction(&mut self, hash: H256)
Notify available filters of a new pending transaction
sourcepub fn notify_new_log(&mut self, log: &Log, latest_block_number: U64)
pub fn notify_new_log(&mut self, log: &Log, latest_block_number: U64)
Notify available filters of a new transaction log
Trait Implementations§
source§impl Clone for EthFilters
impl Clone for EthFilters
source§fn clone(&self) -> EthFilters
fn clone(&self) -> EthFilters
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for EthFilters
impl Debug for EthFilters
source§impl Default for EthFilters
impl Default for EthFilters
source§fn default() -> EthFilters
fn default() -> EthFilters
Returns the “default value” for a type. Read more
source§impl PartialEq<EthFilters> for EthFilters
impl PartialEq<EthFilters> for EthFilters
source§fn eq(&self, other: &EthFilters) -> bool
fn eq(&self, other: &EthFilters) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for EthFilters
Auto Trait Implementations§
impl RefUnwindSafe for EthFilters
impl Send for EthFilters
impl Sync for EthFilters
impl Unpin for EthFilters
impl UnwindSafe for EthFilters
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more