BloomSet

Trait BloomSet 

Source
pub trait BloomSet {
    // Required methods
    fn new(count: usize) -> Self;
    fn size(&self) -> usize;
    fn increment(&mut self, index: usize);
    fn clear(&mut self);
    fn query(&self, index: usize) -> bool;
}
Expand description

A trait for types which can serve as the underlying storage for a BloomFilter.

Required Methods§

Source

fn new(count: usize) -> Self

Creates a new set with count counters.

Source

fn size(&self) -> usize

Returns the number of counters in the storage.

Source

fn increment(&mut self, index: usize)

Increments the counter with index index.

Source

fn clear(&mut self)

Clears all counters.

Source

fn query(&self, index: usize) -> bool

Queries whether a counter indicates presence.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> BloomSet for Box<[T]>
where T: SaturatingAdd + One + Zero + Ord,

Source§

fn new(count: usize) -> Self

Source§

fn size(&self) -> usize

Source§

fn increment(&mut self, index: usize)

Source§

fn clear(&mut self)

Source§

fn query(&self, index: usize) -> bool

Source§

impl<T, O> BloomSet for BitBox<T, O>
where T: BitStore, O: BitOrder,

Source§

fn new(count: usize) -> Self

Source§

fn size(&self) -> usize

Source§

fn increment(&mut self, index: usize)

Source§

fn clear(&mut self)

Source§

fn query(&self, index: usize) -> bool

Implementors§