pub struct EventLog { /* private fields */ }Expand description
Event log for replay
This is a simple in-memory log. In production, you’d persist this to a database or event store.
Implementations§
Source§impl EventLog
impl EventLog
Sourcepub fn append(&mut self, action: ExecutionAction)
pub fn append(&mut self, action: ExecutionAction)
Append an action to the log
Sourcepub fn actions(&self) -> &[ExecutionAction]
pub fn actions(&self) -> &[ExecutionAction]
Get all actions
Sourcepub fn into_actions(self) -> Vec<ExecutionAction>
pub fn into_actions(self) -> Vec<ExecutionAction>
Take all actions (consumes the log)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EventLog
impl RefUnwindSafe for EventLog
impl Send for EventLog
impl Sync for EventLog
impl Unpin for EventLog
impl UnsafeUnpin for EventLog
impl UnwindSafe for EventLog
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