Trait pearl::filter::traits::BloomProvider
source · pub trait BloomProvider<Key: Send + Sync>: Sync + Send {
type Filter: FilterTrait<Key>;
// Required methods
fn check_filter<'life0, 'life1, 'async_trait>(
&'life0 self,
item: &'life1 Key
) -> Pin<Box<dyn Future<Output = FilterResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn check_filter_fast(&self, item: &Key) -> FilterResult;
fn offload_buffer<'life0, 'async_trait>(
&'life0 mut self,
needed_memory: usize,
level: usize
) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_filter<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Option<Self::Filter>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_filter_fast(&self) -> Option<&Self::Filter>;
fn filter_memory_allocated<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Trait for scructs which contains bloom filters
Required Associated Types§
sourcetype Filter: FilterTrait<Key>
type Filter: FilterTrait<Key>
Inner filter type
Required Methods§
sourcefn check_filter<'life0, 'life1, 'async_trait>(
&'life0 self,
item: &'life1 Key
) -> Pin<Box<dyn Future<Output = FilterResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn check_filter<'life0, 'life1, 'async_trait>(
&'life0 self,
item: &'life1 Key
) -> Pin<Box<dyn Future<Output = FilterResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if element in filter
sourcefn check_filter_fast(&self, item: &Key) -> FilterResult
fn check_filter_fast(&self, item: &Key) -> FilterResult
Check if element in filter
sourcefn offload_buffer<'life0, 'async_trait>(
&'life0 mut self,
needed_memory: usize,
level: usize
) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn offload_buffer<'life0, 'async_trait>(
&'life0 mut self,
needed_memory: usize,
level: usize
) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns freed memory
sourcefn get_filter<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Option<Self::Filter>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_filter<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Option<Self::Filter>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns overall filter
sourcefn get_filter_fast(&self) -> Option<&Self::Filter>
fn get_filter_fast(&self) -> Option<&Self::Filter>
Returns overall filter