Skip to main content

Index

Trait Index 

Source
pub trait Index {
    // Required methods
    fn index(&mut self, block: &Block);
    fn remove(&mut self, sequence: u64);
    fn rebuild(&mut self, blocks: impl Iterator<Item = Block>);
}
Expand description

Common trait for all indexes

Required Methods§

Source

fn index(&mut self, block: &Block)

Add a block to the index

Source

fn remove(&mut self, sequence: u64)

Remove a block from the index (for reindexing only)

Source

fn rebuild(&mut self, blocks: impl Iterator<Item = Block>)

Rebuild entire index from blocks

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.

Implementors§