[][src]Trait stable_bloom_filter::Filter

pub trait Filter {
    fn test(&self, _data: &[u8]) -> bool;
fn add(&mut self, _data: &[u8]) -> &Self;
fn test_and_add(&mut self, _data: &[u8]) -> bool; }

Required methods

fn test(&self, _data: &[u8]) -> bool

fn add(&mut self, _data: &[u8]) -> &Self

fn test_and_add(&mut self, _data: &[u8]) -> bool

Loading content...

Implementors

impl Filter for StableBloomFilter[src]

fn test(&self, data: &[u8]) -> bool[src]

Will test for membership of the data and returns true if it is a member, false if not. This is a probabilistic test, meaning there is a non-zero probability of false positives and false negatives.

fn add(&mut self, data: &[u8]) -> &Self[src]

Will add the data to the Stable Bloom Filter. It returns the filter to allow for chaining.

fn test_and_add(&mut self, data: &[u8]) -> bool[src]

Is equivalent to calling Test followed by Add. It returns true if the data is a member, false if not.

Loading content...