pub struct ChangeTracker { /* private fields */ }Expand description
Tracks changes to files and system state
Implementations§
Source§impl ChangeTracker
impl ChangeTracker
Sourcepub fn track_change(
&mut self,
file_path: impl Into<String>,
before: impl Into<String>,
after: impl Into<String>,
description: impl Into<String>,
change_type: ChangeType,
) -> Result<String, UndoRedoError>
pub fn track_change( &mut self, file_path: impl Into<String>, before: impl Into<String>, after: impl Into<String>, description: impl Into<String>, change_type: ChangeType, ) -> Result<String, UndoRedoError>
Track a single change
Sourcepub fn track_batch(&mut self, changes: Vec<Change>) -> Result<(), UndoRedoError>
pub fn track_batch(&mut self, changes: Vec<Change>) -> Result<(), UndoRedoError>
Track multiple changes atomically
Sourcepub fn get_pending_changes(&self) -> Vec<Change>
pub fn get_pending_changes(&self) -> Vec<Change>
Get all pending changes
Sourcepub fn clear_pending(&mut self)
pub fn clear_pending(&mut self)
Clear pending changes
Sourcepub fn pending_count(&self) -> usize
pub fn pending_count(&self) -> usize
Get the number of pending changes
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ChangeTracker
impl RefUnwindSafe for ChangeTracker
impl Send for ChangeTracker
impl Sync for ChangeTracker
impl Unpin for ChangeTracker
impl UnwindSafe for ChangeTracker
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