Trait xorf::Filter

source ·
pub trait Filter<Type> {
    // Required methods
    fn contains(&self, key: &Type) -> bool;
    fn len(&self) -> usize;
}
Expand description

Methods common to xor filters.

Required Methods§

source

fn contains(&self, key: &Type) -> bool

Returns true if the filter probably contains the specified key.

There can never be a false negative, but there is a small possibility of false positives. Refer to individual filters’ documentation for false positive rates.

source

fn len(&self) -> usize

Returns the number of fingerprints in the filter.

Implementors§