Struct blooms_db::Database [−][src]
pub struct Database { /* fields omitted */ }Methods
impl Database[src]
impl Databasepub fn open<P>(path: P) -> Result<Database> where
P: AsRef<Path>, [src]
pub fn open<P>(path: P) -> Result<Database> where
P: AsRef<Path>, pub fn reopen(&self) -> Result<()>[src]
pub fn reopen(&self) -> Result<()>Reopens database at the same location.
pub fn insert_blooms<'a, I, B>(&self, from: u64, blooms: I) -> Result<()> where
BloomRef<'a>: From<B>,
I: Iterator<Item = B>, [src]
pub fn insert_blooms<'a, I, B>(&self, from: u64, blooms: I) -> Result<()> where
BloomRef<'a>: From<B>,
I: Iterator<Item = B>, Inserts one or more blooms into database.
Arguments
from- index of the first bloom that needs to be insertedblooms- iterator over blooms
pub fn filter<'a, B, I, II>(
&self,
from: u64,
to: u64,
blooms: II
) -> Result<Vec<u64>> where
BloomRef<'a>: From<B>,
II: IntoIterator<Item = B, IntoIter = I> + Copy,
I: Iterator<Item = B>, [src]
pub fn filter<'a, B, I, II>(
&self,
from: u64,
to: u64,
blooms: II
) -> Result<Vec<u64>> where
BloomRef<'a>: From<B>,
II: IntoIterator<Item = B, IntoIter = I> + Copy,
I: Iterator<Item = B>, Returns indexes of all headers matching given bloom in a specified range.
Arguments
from- index of the first bloom that needs to be checkedto- index of the last bloom that needs to be checked (inclusive range)blooms- searched pattern