Trait IterableFilterStore

Source
pub trait IterableFilterStore:
    Send
    + Sync
    + IntoIterator<Item = (u32, BlockFilter)> {
    type I: Iterator<Item = (u32, BlockFilter)>;

    // Required methods
    fn iter(
        &self,
        start_height: Option<usize>,
    ) -> Result<Self::I, IterableFilterStoreError>;
    fn put_filter(
        &self,
        block_filter: BlockFilter,
        height: u32,
    ) -> Result<(), IterableFilterStoreError>;
    fn set_height(&self, height: u32) -> Result<(), IterableFilterStoreError>;
    fn get_height(&self) -> Result<u32, IterableFilterStoreError>;
}

Required Associated Types§

Source

type I: Iterator<Item = (u32, BlockFilter)>

Required Methods§

Source

fn iter( &self, start_height: Option<usize>, ) -> Result<Self::I, IterableFilterStoreError>

Fetches the first filter and sets our internal cursor to the first filter, succeeding calls to next() will return the next filter until we reach the end

Source

fn put_filter( &self, block_filter: BlockFilter, height: u32, ) -> Result<(), IterableFilterStoreError>

Writes a new filter to the store

Source

fn set_height(&self, height: u32) -> Result<(), IterableFilterStoreError>

Persists the height of the last filter we have

Source

fn get_height(&self) -> Result<u32, IterableFilterStoreError>

Fetches the height of the last filter we have

Implementors§