pub struct RunHistoryReplay { /* private fields */ }Expand description
Incremental two-pass replay. First fold every fact; then read model events only after the latest successful summary. No persisted checkpoint is created.
Implementations§
Source§impl RunHistoryReplay
impl RunHistoryReplay
Sourcepub fn facts(&mut self, events: &[SessionEvent]) -> Result<(), RuntimeError>
pub fn facts(&mut self, events: &[SessionEvent]) -> Result<(), RuntimeError>
Validate and fold one bounded page of complete durable facts in order.
Sourcepub fn begin_model_tail(&mut self) -> u64
pub fn begin_model_tail(&mut self) -> u64
Freeze the first pass and return the exclusive cursor for the model tail.
Sourcepub fn model_tail(
&mut self,
events: &[SessionEvent],
) -> Result<(), RuntimeError>
pub fn model_tail( &mut self, events: &[SessionEvent], ) -> Result<(), RuntimeError>
Fold subsequent model events through the exact first-pass upper boundary.
Sourcepub fn finish(self) -> Result<RunHistory, RuntimeError>
pub fn finish(self) -> Result<RunHistory, RuntimeError>
Finish only when the model pass reaches the validated facts’ upper boundary.
Auto Trait Implementations§
impl Freeze for RunHistoryReplay
impl RefUnwindSafe for RunHistoryReplay
impl Send for RunHistoryReplay
impl Sync for RunHistoryReplay
impl Unpin for RunHistoryReplay
impl UnsafeUnpin for RunHistoryReplay
impl UnwindSafe for RunHistoryReplay
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