Skip to main content

Module features

Module features 

Source
Expand description

Opt-in feature catalog. Each submodule is gated by its own Cargo feature flag and adds a specific capability to the base k-way merge iterator without bloating the core build.

See Cargo.toml [features] for the catalog + the recipe writeup for per-feature p99 + use-case guidance.

Modules§

dedup
Deduplicating k-way merge. Each input is a stream of (key, value) entries sorted by key. On key tie across sources, the highest- indexed source wins (“latest”). Output is one entry per distinct key.
priority
Priority-aware k-way merge. Each source carries an explicit priority integer. On key tie, the highest-priority source wins. Ties between equal priorities fall through to the source’s registration order (higher source index breaks the tie - matches the latest-source-wins shape used by dedup and tombstones).
reverse
Descending k-way merge - the backward half of a cursor. Sources must be sorted DESCENDING; output is the global descending union.
seek
Seekable k-way merge. Adds seek(target) that advances the iterator past every entry strictly less than target. After seek(t) the next next() returns the smallest value >= t (or None if no source has any).
tombstones
Tombstone-aware k-way merge. Entries carry a key, an optional value, and a tombstone flag. When two or more sources produce entries with the same key, the highest-indexed source (“latest”) wins. If the winning entry is a tombstone, the key is dropped from the output; otherwise its value is yielded.