pub struct ChunkBatchCursor<C: NavigableChunk> { /* private fields */ }Expand description
A cursor over a ChunkBatch, merging the per-chunk cursors.
Chunk breakpoints are unconstrained, so a single key — or (key, val) — may
straddle consecutive chunks. But the chunks are one globally-sorted sequence
merely cut at arbitrary points, so the operation is concatenation, never a
merge: across a boundary a key’s vals concatenate and a (key, val)‘s times
concatenate. The cursor exploits this. It holds the chunk currently being read
and a cursor into it; it seeks by galloping the chunks’ resident
bounds from a remembered hint (the current key’s first
chunk), and at boundaries it continues into the next chunk rather than merging —
consulting the two neighbouring chunks’ bounds to detect when a key or (key, val)
spills forward, without touching chunk contents. No state is materialized up front:
a monotone seek sweep costs O(log Δ) bounds reads per seek and a sequential pass two
per boundary, so cursor construction is free.
Trait Implementations§
Source§impl<C: NavigableChunk> Cursor for ChunkBatchCursor<C>
impl<C: NavigableChunk> Cursor for ChunkBatchCursor<C>
Source§type Storage = ChunkBatch<C>
type Storage = ChunkBatch<C>
Source§type KeyContainer = <<C as Navigable>::Cursor as Cursor>::KeyContainer
type KeyContainer = <<C as Navigable>::Cursor as Cursor>::KeyContainer
Source§type ValContainer = <<C as Navigable>::Cursor as Cursor>::ValContainer
type ValContainer = <<C as Navigable>::Cursor as Cursor>::ValContainer
Source§type TimeContainer = <<C as Navigable>::Cursor as Cursor>::TimeContainer
type TimeContainer = <<C as Navigable>::Cursor as Cursor>::TimeContainer
Source§type TimeGat<'a> = <<C as Navigable>::Cursor as Cursor>::TimeGat<'a>
type TimeGat<'a> = <<C as Navigable>::Cursor as Cursor>::TimeGat<'a>
Source§type DiffContainer = <<C as Navigable>::Cursor as Cursor>::DiffContainer
type DiffContainer = <<C as Navigable>::Cursor as Cursor>::DiffContainer
Source§type DiffGat<'a> = <<C as Navigable>::Cursor as Cursor>::DiffGat<'a>
type DiffGat<'a> = <<C as Navigable>::Cursor as Cursor>::DiffGat<'a>
Source§fn key_valid(&self, s: &Self::Storage) -> bool
fn key_valid(&self, s: &Self::Storage) -> bool
Source§fn val_valid(&self, s: &Self::Storage) -> bool
fn val_valid(&self, s: &Self::Storage) -> bool
Source§fn key<'a>(&self, s: &'a Self::Storage) -> Self::Key<'a>
fn key<'a>(&self, s: &'a Self::Storage) -> Self::Key<'a>
Source§fn val<'a>(&self, s: &'a Self::Storage) -> Self::Val<'a>
fn val<'a>(&self, s: &'a Self::Storage) -> Self::Val<'a>
Source§fn get_key<'a>(&self, s: &'a Self::Storage) -> Option<Self::Key<'a>>
fn get_key<'a>(&self, s: &'a Self::Storage) -> Option<Self::Key<'a>>
Source§fn get_val<'a>(&self, s: &'a Self::Storage) -> Option<Self::Val<'a>>
fn get_val<'a>(&self, s: &'a Self::Storage) -> Option<Self::Val<'a>>
Source§fn map_times<L: FnMut(Self::TimeGat<'_>, Self::DiffGat<'_>)>(
&mut self,
s: &Self::Storage,
logic: L,
)
fn map_times<L: FnMut(Self::TimeGat<'_>, Self::DiffGat<'_>)>( &mut self, s: &Self::Storage, logic: L, )
logic to each pair of time and difference. Intended for mutation of the
closure’s scope.Source§fn seek_key(&mut self, s: &Self::Storage, key: Self::Key<'_>)
fn seek_key(&mut self, s: &Self::Storage, key: Self::Key<'_>)
Source§fn seek_val(&mut self, s: &Self::Storage, val: Self::Val<'_>)
fn seek_val(&mut self, s: &Self::Storage, val: Self::Val<'_>)
Source§fn rewind_keys(&mut self, s: &Self::Storage)
fn rewind_keys(&mut self, s: &Self::Storage)
Source§fn rewind_vals(&mut self, s: &Self::Storage)
fn rewind_vals(&mut self, s: &Self::Storage)
Source§fn owned_time(time: Self::TimeGat<'_>) -> Self::Time
fn owned_time(time: Self::TimeGat<'_>) -> Self::Time
Source§fn owned_diff(diff: Self::DiffGat<'_>) -> Self::Diff
fn owned_diff(diff: Self::DiffGat<'_>) -> Self::Diff
Source§fn clone_time_onto(time: Self::TimeGat<'_>, onto: &mut Self::Time)
fn clone_time_onto(time: Self::TimeGat<'_>, onto: &mut Self::Time)
Auto Trait Implementations§
impl<C> Freeze for ChunkBatchCursor<C>
impl<C> RefUnwindSafe for ChunkBatchCursor<C>
impl<C> Send for ChunkBatchCursor<C>
impl<C> Sync for ChunkBatchCursor<C>
impl<C> Unpin for ChunkBatchCursor<C>
impl<C> UnsafeUnpin for ChunkBatchCursor<C>
impl<C> UnwindSafe for ChunkBatchCursor<C>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
Source§fn plus_equals(&mut self, rhs: &&'a S)
fn plus_equals(&mut self, rhs: &&'a S)
std::ops::AddAssign, for types that do not implement AddAssign.