pub struct SplitBlockBloom { /* private fields */ }Expand description
A split-block bloom filter over 64-bit hashes.
Implementations§
Source§impl SplitBlockBloom
impl SplitBlockBloom
Sourcepub fn size_for(num_keys: usize, bits_per_key: usize) -> usize
pub fn size_for(num_keys: usize, bits_per_key: usize) -> usize
The bytes with_capacity allocates.
Sourcepub fn with_capacity(num_keys: usize, bits_per_key: usize) -> Self
pub fn with_capacity(num_keys: usize, bits_per_key: usize) -> Self
A filter sized for num_keys keys at bits_per_key bits each, rounded
up to a power of two blocks.
pub fn size_bytes(&self) -> usize
pub fn insert(&mut self, hash: u64)
pub fn contains(&self, hash: u64) -> bool
Sourcepub fn union_with(&mut self, other: &Self)
pub fn union_with(&mut self, other: &Self)
Add every key of other, a filter of the same size.
Trait Implementations§
Source§impl Clone for SplitBlockBloom
impl Clone for SplitBlockBloom
Source§fn clone(&self) -> SplitBlockBloom
fn clone(&self) -> SplitBlockBloom
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SplitBlockBloom
impl RefUnwindSafe for SplitBlockBloom
impl Send for SplitBlockBloom
impl Sync for SplitBlockBloom
impl Unpin for SplitBlockBloom
impl UnsafeUnpin for SplitBlockBloom
impl UnwindSafe for SplitBlockBloom
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more