Struct dirty_tracker::DirtyTracker
source · pub struct DirtyTracker { /* private fields */ }Expand description
The tracker object.
This object keeps track of the dirty files in a directory.
The tracker is created with a path to a directory. It will watch for file system events in that directory and keep track of the files that have been modified.
The tracker can be in one of three states:
- Clean: No files have been modified.
- Dirty: Some files have been modified.
- Unknown: The tracker is in an unknown state. This can happen if the tracker has missed some events, or if the underlying file system is behaving in an unexpected way.
Implementations§
source§impl DirtyTracker
impl DirtyTracker
sourcepub fn mark_clean(&mut self)
pub fn mark_clean(&mut self)
Mark all files as clean.
Note that this can race with file modifications, so it’s only safe if you’re sure that no modifications are happening.
sourcepub fn is_dirty(&mut self) -> bool
👎Deprecated since 0.2.0: Use state() instead
pub fn is_dirty(&mut self) -> bool
Returns true if there are dirty files.
Auto Trait Implementations§
impl Freeze for DirtyTracker
impl RefUnwindSafe for DirtyTracker
impl Send for DirtyTracker
impl !Sync for DirtyTracker
impl Unpin for DirtyTracker
impl UnwindSafe for DirtyTracker
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