pub struct TransitionRecord<M, E, C> {
pub step: usize,
pub from: M,
pub to: M,
pub event: E,
pub commands: Vec<C>,
pub timestamp: SystemTime,
}Available on crate feature
journal only.Expand description
A record of one processed event.
A record captures the before/after modes and the emitted commands so a system can be audited or replayed deterministically.
Fields§
§step: usizeSequential step index (0-based) within the journal.
from: MMode before processing the event.
to: MMode after applying the decision.
event: EThe processed event.
commands: Vec<C>Commands emitted by the machine, in order.
timestamp: SystemTimeTimestamp recorded by the journal.
Implementations§
Trait Implementations§
Source§impl<M: Clone, E: Clone, C: Clone> Clone for TransitionRecord<M, E, C>
impl<M: Clone, E: Clone, C: Clone> Clone for TransitionRecord<M, E, C>
Source§fn clone(&self) -> TransitionRecord<M, E, C>
fn clone(&self) -> TransitionRecord<M, E, C>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<M: Eq, E: Eq, C: Eq> Eq for TransitionRecord<M, E, C>
impl<M, E, C> StructuralPartialEq for TransitionRecord<M, E, C>
Auto Trait Implementations§
impl<M, E, C> Freeze for TransitionRecord<M, E, C>
impl<M, E, C> RefUnwindSafe for TransitionRecord<M, E, C>
impl<M, E, C> Send for TransitionRecord<M, E, C>
impl<M, E, C> Sync for TransitionRecord<M, E, C>
impl<M, E, C> Unpin for TransitionRecord<M, E, C>
impl<M, E, C> UnsafeUnpin for TransitionRecord<M, E, C>where
M: UnsafeUnpin,
E: UnsafeUnpin,
impl<M, E, C> UnwindSafe for TransitionRecord<M, E, C>
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