Struct scalable_cuckoo_filter::ScalableCuckooFilterBuilder[][src]

pub struct ScalableCuckooFilterBuilder<H = DefaultHasher, R = DefaultRng> { /* fields omitted */ }

Builder for ScalableCuckooFilter.

Implementations

impl ScalableCuckooFilterBuilder<DefaultHasher, DefaultRng>[src]

pub fn new() -> Self[src]

Makes a new ScalableCuckooFilterBuilder instance.

impl<H: Hasher + Clone, R: Rng> ScalableCuckooFilterBuilder<H, R>[src]

pub fn initial_capacity(self, capacity_hint: usize) -> Self[src]

Sets the initial capacity (i.e., the number of estimated maximum items) of this filter.

The default value is 100_000.

pub fn false_positive_probability(self, probability: f64) -> Self[src]

Sets the expected upper bound of the false positive probability of this filter.

The default value is 0.001.

Panics

This method panics if probability is not a non-negative number smaller than or equal to 1.0.

pub fn entries_per_bucket(self, n: usize) -> Self[src]

Sets the number of entries per bucket of this filter.

The default value is 4.

pub fn max_kicks(self, kicks: usize) -> Self[src]

Sets the maximum number of relocations in an insertion.

If this limit exceeded, the filter will be expanded.

The default value is 512.

pub fn hasher<T: Hasher + Clone>(
    self,
    hasher: T
) -> ScalableCuckooFilterBuilder<T, R>
[src]

Sets the hasher of this filter.

The default value if DefaultHasher::new().

pub fn rng<T: Rng>(self, rng: T) -> ScalableCuckooFilterBuilder<H, T>[src]

Sets the random number generator of this filter.

The default value is rand::thread_rng().

pub fn finish<T: Hash + ?Sized>(self) -> ScalableCuckooFilter<T, H, R>[src]

Builds a ScalableCuckooFilter instance.

Trait Implementations

impl<H: Debug, R: Debug> Debug for ScalableCuckooFilterBuilder<H, R>[src]

impl Default for ScalableCuckooFilterBuilder[src]

Auto Trait Implementations

impl<H, R> RefUnwindSafe for ScalableCuckooFilterBuilder<H, R> where
    H: RefUnwindSafe,
    R: RefUnwindSafe

impl<H, R> Send for ScalableCuckooFilterBuilder<H, R> where
    H: Send,
    R: Send

impl<H, R> Sync for ScalableCuckooFilterBuilder<H, R> where
    H: Sync,
    R: Sync

impl<H, R> Unpin for ScalableCuckooFilterBuilder<H, R> where
    H: Unpin,
    R: Unpin

impl<H, R> UnwindSafe for ScalableCuckooFilterBuilder<H, R> where
    H: UnwindSafe,
    R: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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