pub struct Cursor { /* private fields */ }Expand description
How far a scan has got, maintained as it runs.
Cheap to update. A snapshot holds what neither watermark has reached; see the module documentation.
Implementations§
Source§impl Cursor
impl Cursor
Sourcepub fn new() -> Self
pub fn new() -> Self
A cursor over a plan with nothing settled yet, counted in plan order alone.
Sourcepub fn walking(order: Permutation) -> Self
pub fn walking(order: Permutation) -> Self
A cursor over a plan with nothing settled yet, that also counts along order,
the order the scan asks its targets in. Settled in that order, a plan of any size holds
about a pipeline’s worth of positions.
Sourcepub fn from_checkpoint(checkpoint: &Checkpoint) -> Self
pub fn from_checkpoint(checkpoint: &Checkpoint) -> Self
Resumes from a checkpoint, along the walk it recorded if any.
Sourcepub fn settle(&mut self, position: u64)
pub fn settle(&mut self, position: u64)
Records that the target at position is settled.
Idempotent: settling a position already passed or recorded changes nothing. A target can be reported twice, by a probe retired on its retry budget and then by a stop path that does not know it already had a verdict.
Sourcepub fn watermark(&self) -> u64
pub fn watermark(&self) -> u64
The position below which every target is settled, in plan order.
A resume starts here, and skips the positions above it that
is_settled names.
Sourcepub fn settled_above(&self) -> impl Iterator<Item = u64> + '_
pub fn settled_above(&self) -> impl Iterator<Item = u64> + '_
The settled positions neither watermark has reached, ascending.
Sourcepub fn is_settled(&self, position: u64) -> bool
pub fn is_settled(&self, position: u64) -> bool
Whether the target at position may be skipped.
Sourcepub fn settled_count(&self) -> u64
pub fn settled_count(&self) -> u64
How many targets are settled in total.
Saturating like the watermark’s advance: a count that wrapped would report a nearly finished scan as barely started.
Sourcepub fn pending_count(&self) -> usize
pub fn pending_count(&self) -> usize
How many settled positions are waiting on a gap below them in both orders.
The size of the out-of-order window, and so of a checkpoint. A number that keeps growing means a target that never settles: a tarpit or a defect.
Sourcepub fn checkpoint(&self) -> Checkpoint
pub fn checkpoint(&self) -> Checkpoint
A snapshot to write to disk.
Trait Implementations§
impl Eq for Cursor
impl StructuralPartialEq for Cursor
Auto Trait Implementations§
impl Freeze for Cursor
impl RefUnwindSafe for Cursor
impl Send for Cursor
impl Sync for Cursor
impl Unpin for Cursor
impl UnsafeUnpin for Cursor
impl UnwindSafe for Cursor
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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 more