Struct CountingBloomFilter

Source
pub struct CountingBloomFilter<BHK: BuildHashKernels> { /* private fields */ }

Implementations§

Source§

impl<BHK: BuildHashKernels> Filter<BHK>

Source

pub fn new( items_count: usize, bucket_size: u8, fp_rate: f64, build_hash_kernels: BHK, ) -> Self

Create a new bloom filter structure. items_count is an estimation of the maximum number of items to store. bucket_size is the specified number of bits fp_rate is the wanted rate of false positives, in ]0.0, 1.0[

Trait Implementations§

Source§

impl<BHK: BuildHashKernels> BloomFilter for Filter<BHK>

Source§

fn insert<T: Hash>(&mut self, item: &T)

Source§

fn contains<T: Hash>(&self, item: &T) -> bool

Source§

fn reset(&mut self)

Source§

impl<BHK: BuildHashKernels> RemovableBloomFilter for Filter<BHK>

Source§

fn remove<T: Hash>(&mut self, item: &T)

Auto Trait Implementations§

§

impl<BHK> Freeze for Filter<BHK>
where <BHK as BuildHashKernels>::HK: Freeze,

§

impl<BHK> RefUnwindSafe for Filter<BHK>

§

impl<BHK> Send for Filter<BHK>
where <BHK as BuildHashKernels>::HK: Send,

§

impl<BHK> Sync for Filter<BHK>
where <BHK as BuildHashKernels>::HK: Sync,

§

impl<BHK> Unpin for Filter<BHK>
where <BHK as BuildHashKernels>::HK: Unpin,

§

impl<BHK> UnwindSafe for Filter<BHK>
where <BHK as BuildHashKernels>::HK: UnwindSafe,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V