pub struct LatestRows { /* private fields */ }Expand description
The last row per identity (harness plus step_ref), in the order reads
returned them.
Apply rows in the order the reads return them, which is cursor order:
pages oldest first, one read at a time, each from the previous read’s
ReadReply::resume_after. A later row for an identity replaces the kept
one in place; it is never appended. Re-applying a row already seen is
harmless, because it replaces itself. Cursors are never compared.
Implementations§
Source§impl LatestRows
impl LatestRows
pub fn new() -> Self
Sourcepub fn apply_reply(&mut self, reply: ReadReply)
pub fn apply_reply(&mut self, reply: ReadReply)
Applies a reply’s rows in order and records where the next read starts.
Sourcepub fn resume_after(&self) -> Option<&Cursor>
pub fn resume_after(&self) -> Option<&Cursor>
The cursor to pass as the next read’s after, once a reply was
applied.
Sourcepub fn get(&self, harness: &str, step_ref: &str) -> Option<&StepRow>
pub fn get(&self, harness: &str, step_ref: &str) -> Option<&StepRow>
The kept row for an identity.
Sourcepub fn iter(&self) -> impl Iterator<Item = &StepRow>
pub fn iter(&self) -> impl Iterator<Item = &StepRow>
Kept rows, one per identity, in the order each identity was first seen.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for LatestRows
impl Clone for LatestRows
Source§impl Debug for LatestRows
impl Debug for LatestRows
Auto Trait Implementations§
impl Freeze for LatestRows
impl RefUnwindSafe for LatestRows
impl Send for LatestRows
impl Sync for LatestRows
impl Unpin for LatestRows
impl UnsafeUnpin for LatestRows
impl UnwindSafe for LatestRows
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
Mutably borrows from an owned value. Read more