pub struct ProjectionReplayService;Expand description
Projection replay service — fold/reducer model for custom aggregations.
Unlike ReplayService which assumes full snapshots,
this service supports both full-snapshot and diff-based event logs.
reducer.initial_state() returns the empty starting state,
reducer.apply(state, event) accumulates each event.
Use for custom aggregations (transition count, cumulative metrics) or when the event log stores diffs rather than full snapshots.
Implementations§
Source§impl ProjectionReplayService
impl ProjectionReplayService
pub fn state_at_version<T>( events: &[VersionedTransitionEvent], flow_id: &str, target_version: u32, reducer: &dyn ProjectionReducer<T>, ) -> T
Auto Trait Implementations§
impl Freeze for ProjectionReplayService
impl RefUnwindSafe for ProjectionReplayService
impl Send for ProjectionReplayService
impl Sync for ProjectionReplayService
impl Unpin for ProjectionReplayService
impl UnsafeUnpin for ProjectionReplayService
impl UnwindSafe for ProjectionReplayService
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