pub enum ReadResult {
Ok {
events: Vec<ObservedEvent>,
next_cursor: u64,
reset_epoch: u64,
},
CursorExpired {
head_cursor: u64,
reset_epoch: u64,
},
}Expand description
Outcome of TopicRing::read_since.
Variants§
Ok
Zero or more events newer than the requested cursor. next_cursor
is the cursor the caller should send on their next poll.
Fields
§
events: Vec<ObservedEvent>Events strictly newer than the requested cursor, in insertion order, capped at the requested limit.
CursorExpired
The caller’s cursor is older than the oldest event still buffered,
or newer than the newest cursor this ring has ever handed out (a
cursor from a previous process). Either way they must reset to
head_cursor - 1 and emit a gap.
Trait Implementations§
Source§impl Clone for ReadResult
impl Clone for ReadResult
Source§fn clone(&self) -> ReadResult
fn clone(&self) -> ReadResult
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 moreAuto Trait Implementations§
impl Freeze for ReadResult
impl RefUnwindSafe for ReadResult
impl Send for ReadResult
impl Sync for ReadResult
impl Unpin for ReadResult
impl UnsafeUnpin for ReadResult
impl UnwindSafe for ReadResult
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