pub struct RingCursor { /* private fields */ }Expand description
Caller-owned position in a ring walk.
The cursor stores the next counter a reader should attempt. Different subscribers keep independent cursors over the same ring.
Implementations§
Source§impl RingCursor
impl RingCursor
Sourcepub const fn from_start() -> Self
pub const fn from_start() -> Self
Start at counter 0 and replay whatever ring history is still available.
Sourcepub const fn from_counter(next_counter: u64) -> Self
pub const fn from_counter(next_counter: u64) -> Self
Start from a known next counter.
Sourcepub const fn next_counter(self) -> u64
pub const fn next_counter(self) -> u64
The next counter this cursor will read.
Trait Implementations§
Source§impl Clone for RingCursor
impl Clone for RingCursor
Source§fn clone(&self) -> RingCursor
fn clone(&self) -> RingCursor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RingCursor
impl Debug for RingCursor
Source§impl Default for RingCursor
impl Default for RingCursor
Source§fn default() -> RingCursor
fn default() -> RingCursor
Returns the “default value” for a type. Read more
Source§impl PartialEq for RingCursor
impl PartialEq for RingCursor
Source§fn eq(&self, other: &RingCursor) -> bool
fn eq(&self, other: &RingCursor) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for RingCursor
impl Eq for RingCursor
impl StructuralPartialEq for RingCursor
Auto Trait Implementations§
impl Freeze for RingCursor
impl RefUnwindSafe for RingCursor
impl Send for RingCursor
impl Sync for RingCursor
impl Unpin for RingCursor
impl UnsafeUnpin for RingCursor
impl UnwindSafe for RingCursor
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