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. Its pages are only touched once a key is
inserted in them.
pub fn size_bytes(&self) -> usize
pub fn insert_many(&mut self, hashes: &[u64])
pub fn contains(&self, hash: u64) -> bool
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 moreSource§impl From<SplitBlockBloom> for AtomicSplitBlockBloom
impl From<SplitBlockBloom> for AtomicSplitBlockBloom
Source§fn from(bloom: SplitBlockBloom) -> Self
fn from(bloom: SplitBlockBloom) -> Self
Converts to this type from the input type.
Auto 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