pub trait Indexer {
    type ChangeSet;

    fn index_txout(
        &mut self,
        outpoint: OutPoint,
        txout: &TxOut
    ) -> Self::ChangeSet; fn index_tx(&mut self, tx: &Transaction) -> Self::ChangeSet; fn apply_changeset(&mut self, changeset: Self::ChangeSet); fn initial_changeset(&self) -> Self::ChangeSet; fn is_tx_relevant(&self, tx: &Transaction) -> bool; }
Expand description

Utilities for indexing transaction data.

Types which implement this trait can be used to construct an IndexedTxGraph. This trait’s methods should rarely be called directly.

Required Associated Types§

The resultant “changeset” when new transaction data is indexed.

Required Methods§

Scan and index the given outpoint and txout.

Scans a transaction for relevant outpoints, which are stored and indexed internally.

Apply changeset to itself.

Determines the ChangeSet between self and an empty Indexer.

Determines whether the transaction should be included in the index.

Implementors§