pub struct ChangeLog { /* private fields */ }Expand description
Audit trail for tracking all changes to the dependency graph
Implementations§
Source§impl ChangeLog
impl ChangeLog
pub fn new() -> Self
pub fn with_max_changelog_events(max: usize) -> Self
pub fn set_max_changelog_events(&mut self, max: Option<usize>)
pub fn record(&mut self, event: ChangeEvent)
Sourcepub fn record_with_meta(&mut self, event: ChangeEvent, meta: ChangeEventMeta)
pub fn record_with_meta(&mut self, event: ChangeEvent, meta: ChangeEventMeta)
Record an event with explicit metadata (used for replay/redo).
Sourcepub fn begin_compound(&mut self, description: String)
pub fn begin_compound(&mut self, description: String)
Begin a compound operation (multiple changes from single action)
Sourcepub fn end_compound(&mut self)
pub fn end_compound(&mut self)
End a compound operation
pub fn events(&self) -> &[ChangeEvent]
pub fn patch_last_cell_event_old_state( &mut self, addr: CellRef, old_value: Option<LiteralValue>, old_formula: Option<ASTNode>, )
pub fn event_meta(&self, index: usize) -> Option<&ChangeEventMeta>
pub fn set_actor_id(&mut self, actor_id: Option<String>)
pub fn set_correlation_id(&mut self, correlation_id: Option<String>)
pub fn set_reason(&mut self, reason: Option<String>)
pub fn clear(&mut self)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn take_from(&mut self, index: usize) -> Vec<ChangeEvent>
pub fn take_from(&mut self, index: usize) -> Vec<ChangeEvent>
Extract events from index to end
Sourcepub fn set_enabled(&mut self, enabled: bool)
pub fn set_enabled(&mut self, enabled: bool)
Temporarily disable logging (for rollback operations)
Sourcepub fn compound_depth(&self) -> usize
pub fn compound_depth(&self) -> usize
Get current compound depth (for testing)
Sourcepub fn meta(&self, index: usize) -> Option<(u64, Option<u64>)>
pub fn meta(&self, index: usize) -> Option<(u64, Option<u64>)>
Return (sequence_number, group_id) metadata for event index
Sourcepub fn last_group_indices(&self) -> Vec<usize>
pub fn last_group_indices(&self) -> Vec<usize>
Collect indices belonging to the last (innermost) complete group. Fallback: last single event.
Trait Implementations§
Source§impl ChangeLogger for ChangeLog
impl ChangeLogger for ChangeLog
fn record(&mut self, event: ChangeEvent)
fn set_enabled(&mut self, enabled: bool)
fn begin_compound(&mut self, description: String)
fn end_compound(&mut self)
Auto Trait Implementations§
impl Freeze for ChangeLog
impl RefUnwindSafe for ChangeLog
impl Send for ChangeLog
impl Sync for ChangeLog
impl Unpin for ChangeLog
impl UnsafeUnpin for ChangeLog
impl UnwindSafe for ChangeLog
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more