pub trait IteratableFilterStore: Send + Sync + IntoIterator<Item = (u32, BlockFilter)> {
type I: Iterator<Item = (u32, BlockFilter)>;
// Required methods
fn iter(
&self,
start_height: Option<usize>
) -> Result<Self::I, IteratableFilterStoreError>;
fn put_filter(
&self,
block_filter: BlockFilter,
height: u32
) -> Result<(), IteratableFilterStoreError>;
fn set_height(&self, height: u32) -> Result<(), IteratableFilterStoreError>;
fn get_height(&self) -> Result<u32, IteratableFilterStoreError>;
}
Required Associated Types§
type I: Iterator<Item = (u32, BlockFilter)>
Required Methods§
sourcefn iter(
&self,
start_height: Option<usize>
) -> Result<Self::I, IteratableFilterStoreError>
fn iter( &self, start_height: Option<usize> ) -> Result<Self::I, IteratableFilterStoreError>
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<(), IteratableFilterStoreError>
fn put_filter( &self, block_filter: BlockFilter, height: u32 ) -> Result<(), IteratableFilterStoreError>
Writes a new filter to the store
sourcefn set_height(&self, height: u32) -> Result<(), IteratableFilterStoreError>
fn set_height(&self, height: u32) -> Result<(), IteratableFilterStoreError>
Persists the height of the last filter we have
sourcefn get_height(&self) -> Result<u32, IteratableFilterStoreError>
fn get_height(&self) -> Result<u32, IteratableFilterStoreError>
Fetches the height of the last filter we have