TombstoneSet

Trait TombstoneSet 

Source
pub trait TombstoneSet<Key>: Len + Extend<Key> {
    // Required methods
    fn contains(&self, key: &Key) -> bool;
    fn union_with(&mut self, other: &Self) -> usize;
}
Expand description

Trait for tombstone set implementations that support efficient union operations.

This trait abstracts over different tombstone storage strategies, allowing specialized implementations like RoaringTombstoneSet and FstTombstoneSet to provide optimized merge operations for their respective key types.

Implementors must provide:

  • A way to check membership (contains)
  • A way to union with another tombstone set (union_with)
  • Standard collection traits (Len, Extend, etc.)

Required Methods§

Source

fn contains(&self, key: &Key) -> bool

Check if a key is in the tombstone set.

Source

fn union_with(&mut self, other: &Self) -> usize

Union this tombstone set with another, modifying self in place. Returns the old length before the union.

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.

Implementations on Foreign Types§

Source§

impl<K> TombstoneSet<K> for HashSet<K>
where K: Eq + Hash + Clone,

Source§

fn contains(&self, key: &K) -> bool

Source§

fn union_with(&mut self, other: &Self) -> usize

Implementors§