pub struct ScanCursor<'view> { /* private fields */ }Expand description
Forward cursor tied to one protected view. No full candidate collection.
v2 (B7 follow-up): when the view’s current-value fast path is valid
(see ReadView::native_range), one real backend cursor serves the
whole scan — built lazily on the first Self::next_batch call and
held across calls (native/native_checked). Otherwise falls back to
v1’s ordered seek-per-row (next_key + read_value_with_limits).
Each batch plus at most one bounded lookahead row is allocated. Callers
must release consumed batches; shared outstanding-byte admission is P01.
Implementations§
Source§impl ScanCursor<'_>
impl ScanCursor<'_>
Sourcepub fn next_batch(
&mut self,
row_limit: usize,
byte_limit: usize,
) -> Result<ScanBatch, StorageError>
pub fn next_batch( &mut self, row_limit: usize, byte_limit: usize, ) -> Result<ScanBatch, StorageError>
Fetch up to row_limit rows bounded by byte_limit copied bytes.
§Errors
Returns StorageError::InvalidRead for zero limits,
StorageError::Cancelled if the view was cancelled, or
StorageError::ResourceExhausted if a single row exceeds
byte_limit.