pub struct MarkerReader { /* private fields */ }Expand description
Read-side scanner for a single data marker sidecar.
The reader owns an already-open marker backend. It folds cursor snapshots up to a target
event_seq_before and resolves stream slots through the durable stream dictionary.
Implementations§
Source§impl MarkerReader
impl MarkerReader
Sourcepub fn new(backend: Box<dyn MarkerBackend>) -> Self
pub fn new(backend: Box<dyn MarkerBackend>) -> Self
Creates a reader over an already-open marker backend.
Sourcepub fn fold_to(
&self,
event_seq_before: u64,
) -> Result<AHashMap<StreamSlot, StreamCursor>, EventStoreError>
pub fn fold_to( &self, event_seq_before: u64, ) -> Result<AHashMap<StreamSlot, StreamCursor>, EventStoreError>
Folds cursor snapshots whose event_seq_before is at or below event_seq_before.
The returned map carries the latest known cursor per stream slot at the target event-store boundary. Slots that did not advance in later snapshots keep their previous cursor.
§Errors
Returns EventStoreError when the backend cannot scan cursor snapshots.
Sourcepub fn stream_dictionary(
&self,
) -> Result<AHashMap<StreamSlot, StreamDictEntry>, EventStoreError>
pub fn stream_dictionary( &self, ) -> Result<AHashMap<StreamSlot, StreamDictEntry>, EventStoreError>
Scans the durable stream dictionary into a map keyed by stream slot.
§Errors
Returns EventStoreError when the backend cannot scan the dictionary.
Sourcepub fn resolve_slot(&self, slot: StreamSlot) -> Option<StreamDictEntry>
pub fn resolve_slot(&self, slot: StreamSlot) -> Option<StreamDictEntry>
Resolves slot to its stream dictionary entry.
Returns None when the slot is unknown or the backend cannot scan the dictionary.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for MarkerReader
impl !Sync for MarkerReader
impl !UnwindSafe for MarkerReader
impl Freeze for MarkerReader
impl Send for MarkerReader
impl Unpin for MarkerReader
impl UnsafeUnpin for MarkerReader
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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