reth_eth_wire

Trait HandleMempoolData

pub trait HandleMempoolData {
    // Required methods
    fn is_empty(&self) -> bool;
    fn len(&self) -> usize;
    fn retain_by_hash(&mut self, f: impl FnMut(&FixedBytes<32>) -> bool);
}
Expand description

Interface for handling mempool message data. Used in various filters in pipelines in TransactionsManager and in queries to TransactionPool.

Required Methods§

fn is_empty(&self) -> bool

The announcement contains no entries.

fn len(&self) -> usize

Returns the number of entries.

fn retain_by_hash(&mut self, f: impl FnMut(&FixedBytes<32>) -> bool)

Retain only entries for which the hash in the entry satisfies a given predicate.

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.

Implementations on Foreign Types§

§

impl<T> HandleMempoolData for Vec<T>
where T: SignedTransaction,

§

fn is_empty(&self) -> bool

§

fn len(&self) -> usize

§

fn retain_by_hash(&mut self, f: impl FnMut(&FixedBytes<32>) -> bool)

Implementors§