[−][src]Struct stable_bloom_filter::buckets::Buckets
Buckets is a fast, space-efficient array of buckets where each bucket can store up to a configured maximum value.
Methods
impl Buckets
[src]
pub fn new(count: usize, bucket_size: u8) -> Self
[src]
Creates a new Buckets with the provided number of buckets where each bucket is the specified number of bits.
pub fn max_bucket_value(&self) -> u8
[src]
Returns the maximum value that can be stored in a bucket.
pub fn count(&self) -> usize
[src]
Returns the number of buckets.
pub fn decrease(&mut self, bucket: usize, delta: u8) -> &Self
[src]
Decrease the value in the specified bucket by the provided delta. The value is clamped to zero and the maximum bucket value. Returns itself to allow for chaining.
pub fn increment(&mut self, bucket: usize, delta: u8) -> &Self
[src]
Increment the value in the specified bucket by the provided delta. The value is clamped to zero and the maximum bucket value. Returns itself to allow for chaining.
pub fn set(&mut self, bucket: usize, value: u8) -> &Self
[src]
Set the bucket value. The value is clamped to zero and the maximum bucket value. Returns itself to allow for chaining.
pub fn get(&self, bucket: usize) -> u8
[src]
Returns the value in the specified bucket.
pub fn reset(&mut self) -> &Self
[src]
Reset restores the Buckets to the original state. Returns itself to allow for chaining.
Auto Trait Implementations
impl Unpin for Buckets
impl Sync for Buckets
impl Send for Buckets
impl UnwindSafe for Buckets
impl RefUnwindSafe for Buckets
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,