pub struct EventLog { /* private fields */ }Expand description
Append-only log of all graph events. Snapshots every N events for efficient recovery without full replay.
Implementations§
Source§impl EventLog
impl EventLog
pub fn new(snapshot_interval: u64) -> Self
pub fn append(&mut self, event: GraphEvent)
pub fn events(&self) -> &[GraphEvent]
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn record_snapshot(&mut self, snapshot: GraphSnapshot)
pub fn should_snapshot(&self) -> bool
pub fn last_snapshot(&self) -> Option<&GraphSnapshot>
Sourcepub fn events_since_snapshot(&self) -> &[GraphEvent]
pub fn events_since_snapshot(&self) -> &[GraphEvent]
Events since last snapshot (for replay from snapshot)
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