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§
Required Methods§
Sourcefn iter(
&self,
start_height: Option<usize>,
) -> Result<Self::I, IterableFilterStoreError>
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
Sourcefn put_filter(
&self,
block_filter: BlockFilter,
height: u32,
) -> Result<(), IterableFilterStoreError>
fn put_filter( &self, block_filter: BlockFilter, height: u32, ) -> Result<(), IterableFilterStoreError>
Writes a new filter to the store
Sourcefn set_height(&self, height: u32) -> Result<(), IterableFilterStoreError>
fn set_height(&self, height: u32) -> Result<(), IterableFilterStoreError>
Persists the height of the last filter we have
Sourcefn get_height(&self) -> Result<u32, IterableFilterStoreError>
fn get_height(&self) -> Result<u32, IterableFilterStoreError>
Fetches the height of the last filter we have