pub struct FileTracker { /* private fields */ }
Expand description
Tracks file changes and provides rollback functionality
Implementations§
Source§impl FileTracker
impl FileTracker
Sourcepub fn new_with_restore(restore_enabled: bool) -> Self
pub fn new_with_restore(restore_enabled: bool) -> Self
Creates a new FileTracker with restore on drop configurable
Sourcepub fn track_file(&mut self, path: &Path) -> Result<()>
pub fn track_file(&mut self, path: &Path) -> Result<()>
Starts tracking a file
Sourcepub fn track_rename(&mut self, source: &Path, target: &Path) -> Result<()>
pub fn track_rename(&mut self, source: &Path, target: &Path) -> Result<()>
Tracks a file rename operation
Sourcepub fn force_rollback(&mut self)
pub fn force_rollback(&mut self)
Force rollback of tracked changes
Trait Implementations§
Source§impl Default for FileTracker
impl Default for FileTracker
Auto Trait Implementations§
impl Freeze for FileTracker
impl RefUnwindSafe for FileTracker
impl Send for FileTracker
impl Sync for FileTracker
impl Unpin for FileTracker
impl UnwindSafe for FileTracker
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