trait Bucket:
    Debug
    + Default
    + Clone
    + EstimateSize
    + Send
    + Sync
    + 'static {
    // Required methods
    fn update(&mut self, index: u8, retract: bool) -> Result<()>;
    fn max(&self) -> u8;
}

Required Methods§

Source

fn update(&mut self, index: u8, retract: bool) -> Result<()>

Increments or decrements the bucket at index depending on the state of retract. Returns an Error if index is invalid or if inserting will cause an overflow in the bucket.

Source

fn max(&self) -> u8

Gets the number of the maximum bucket which has a count greater than zero.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Bucket for AppendOnlyBucket

Source§

impl<const DENSE_BITS: usize> Bucket for UpdatableBucket<DENSE_BITS>