RangeExtractor

Type Alias RangeExtractor 

Source
pub type RangeExtractor = Arc<dyn Fn(Range, &mut dyn FnMut(usize)) + Send + Sync>;
Expand description

A callback that emits virtual item indexes for a given visible range.

This is designed for zero-allocation adapters: instead of returning a Vec, the extractor receives an emit callback and can push indexes directly into the adapter’s output buffer.

Contract:

  • emit(i) must be called with i < range.count.
  • The emitted indexes must be sorted ascending; duplicates are allowed but ignored.

Tip: use crate::IndexEmitter to enforce the contract (and to avoid accidental panics in debug builds).

Aliased Type§

pub struct RangeExtractor { /* private fields */ }