pub struct ReplayService;Expand description
Replay service — reconstructs flow state at any version.
Assumes each TRANSITION event stores a full snapshot of the state. Returns the latest matching state at or before the requested version.
If the event log is later changed to store diffs instead of full snapshots,
use ProjectionReplayService with a fold/reducer instead.
Implementations§
Source§impl ReplayService
impl ReplayService
pub fn state_at_version( events: &[VersionedTransitionEvent], flow_id: &str, target_version: u32, ) -> Option<String>
Auto Trait Implementations§
impl Freeze for ReplayService
impl RefUnwindSafe for ReplayService
impl Send for ReplayService
impl Sync for ReplayService
impl Unpin for ReplayService
impl UnsafeUnpin for ReplayService
impl UnwindSafe for ReplayService
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