Skip to main content

BaseDropSet

Trait BaseDropSet 

Source
pub trait BaseDropSet: Send + Sync {
    // Required method
    fn base_contains(&self, drop_id: &[u8; 32]) -> bool;
}
Expand description

Load every DropId present in a base image’s slabs + the image’s ManifestRoot. Used by write_layer to decide which chunks can be referenced rather than re-encoded. A base image’s drop set, queried per chunk during layer writes.

The exact form is a HashSet built by opening every base slab. The sparse form (SparseBackedBaseIndex, sparse-index feature) keeps that cost OFF the layer build until first needed: a false-negative-free Bloom filter answers “definitely not in base” in O(1), and only a probable hit lazily loads the exact set. False positives are impossible to observe — the fallback is exact — so layer output is byte-identical either way.

Required Methods§

Source

fn base_contains(&self, drop_id: &[u8; 32]) -> bool

Exact-membership answer (may lazily load state on first probable hit).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl BaseDropSet for HashSet<[u8; 32]>

Source§

fn base_contains(&self, drop_id: &[u8; 32]) -> bool

Implementors§