pub struct StateUpdatedOnlyReducer;Expand description
Reducer that applies only StateUpdated (deserialize payload → replace state); other events no-op. Use for replay when the event log was produced by the graph (StateUpdated, Interrupted, Resumed, Completed).
Trait Implementations§
Source§impl<S> Reducer<S> for StateUpdatedOnlyReducerwhere
S: KernelState + DeserializeOwned,
impl<S> Reducer<S> for StateUpdatedOnlyReducerwhere
S: KernelState + DeserializeOwned,
Source§fn apply(
&self,
state: &mut S,
event: &SequencedEvent,
) -> Result<(), KernelError>
fn apply( &self, state: &mut S, event: &SequencedEvent, ) -> Result<(), KernelError>
Applies a single sequenced event to the state (in place).
Auto Trait Implementations§
impl Freeze for StateUpdatedOnlyReducer
impl RefUnwindSafe for StateUpdatedOnlyReducer
impl Send for StateUpdatedOnlyReducer
impl Sync for StateUpdatedOnlyReducer
impl Unpin for StateUpdatedOnlyReducer
impl UnsafeUnpin for StateUpdatedOnlyReducer
impl UnwindSafe for StateUpdatedOnlyReducer
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