Skip to main content

HandleMempoolData

Trait HandleMempoolData 

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

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

Required Methods§

Source

fn is_empty(&self) -> bool

The announcement contains no entries.

Source

fn len(&self) -> usize

Returns the number of entries.

Source

fn retain_by_hash(&mut self, f: impl FnMut(&TxHash) -> 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".

Implementations on Foreign Types§

Source§

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

Source§

fn is_empty(&self) -> bool

Source§

fn len(&self) -> usize

Source§

fn retain_by_hash(&mut self, f: impl FnMut(&TxHash) -> bool)

Implementors§