pub struct CombinedFilter<K>where
    for<'a> K: Key<'a>,{ /* private fields */ }
Expand description

Combined bloom and range filter

Implementations§

source§

impl<K> CombinedFilter<K>where for<'a> K: Key<'a>,

source

pub fn new(bloom: Option<Bloom>, range: RangeFilter<K>) -> Self

Create new CombinedFilter

source

pub fn bloom(&self) -> &Option<Bloom>

Get inner bloom filter

source

pub fn range(&self) -> &RangeFilter<K>

Get inner range filter

Trait Implementations§

source§

impl<K> Clone for CombinedFilter<K>where for<'a> K: Key<'a> + Clone,

source§

fn clone(&self) -> CombinedFilter<K>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<K> Debug for CombinedFilter<K>where for<'a> K: Key<'a> + Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<K> FilterTrait<K> for CombinedFilter<K>where for<'a> K: Key<'a> + Send + Sync, Bloom: FilterTrait<K>,

Trait filters should implement

source§

fn add(&self, key: &K)

Add key to filter

source§

fn contains_fast(&self, key: &K) -> FilterResult

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

source§

fn contains<'life0, 'life1, 'life2, 'async_trait, P>( &'life0 self, provider: &'life1 P, key: &'life2 K ) -> Pin<Box<dyn Future<Output = FilterResult> + Send + 'async_trait>>where P: 'async_trait + BloomDataProvider, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Check if key in filter (can take some time)

source§

fn offload_filter(&mut self) -> usize

Offload filter from memory if possible

source§

fn checked_add_assign(&mut self, other: &Self) -> bool

Add another filter to this filter

source§

fn memory_allocated(&self) -> usize

Memory used by filter

source§

fn clear_filter(&mut self)

Clear all filter data
source§

fn is_filter_offloaded(&self) -> bool

Check if filter was offloaded

Auto Trait Implementations§

§

impl<K> RefUnwindSafe for CombinedFilter<K>

§

impl<K> Send for CombinedFilter<K>

§

impl<K> Sync for CombinedFilter<K>

§

impl<K> Unpin for CombinedFilter<K>where K: Unpin,

§

impl<K> UnwindSafe for CombinedFilter<K>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.