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
priorityinteger. 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 bydedupandtombstones). - 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 thantarget. Afterseek(t)the nextnext()returns the smallest value >=t(orNoneif 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
valueis yielded.