pub trait FilterTrait<Key: Send + Sync>: Clone + Sync + Send {
    fn add(&mut self, key: &Key);
    fn contains_fast(&self, key: &Key) -> FilterResult;
    fn checked_add_assign(&mut self, other: &Self) -> bool;
    fn clear_filter(&mut self);

    fn contains<'life0, 'life1, 'life2, 'async_trait, P>(
        &'life0 self,
        _provider: &'life1 P,
        key: &'life2 Key
    ) -> Pin<Box<dyn Future<Output = FilterResult> + Send + 'async_trait>>
    where
        P: 'async_trait + BloomDataProvider,
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
, { ... } fn offload_filter(&mut self) -> usize { ... } fn memory_allocated(&self) -> usize { ... } fn is_filter_offloaded(&self) -> bool { ... } }
Expand description

Trait filters should implement

Required Methods

Add key to filter

Check if key in filter (should be implemented if filter can be checked without waiting)

Add another filter to this filter

Clear all filter data

Provided Methods

Check if key in filter (can take some time)

Offload filter from memory if possible

Memory used by filter

Check if filter was offloaded

Implementations on Foreign Types

Check if key in filter (can take some time)

Implementors

Trait filters should implement