Skip to main content

ScanCursor

Struct ScanCursor 

Source
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<'_>

Source

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.

Auto Trait Implementations§

§

impl<'view> !RefUnwindSafe for ScanCursor<'view>

§

impl<'view> !Send for ScanCursor<'view>

§

impl<'view> !Sync for ScanCursor<'view>

§

impl<'view> !UnwindSafe for ScanCursor<'view>

§

impl<'view> Freeze for ScanCursor<'view>

§

impl<'view> Unpin for ScanCursor<'view>

§

impl<'view> UnsafeUnpin for ScanCursor<'view>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.