pub struct FileWatcher { /* private fields */ }
Expand description
File system watcher
Implementations§
Source§impl FileWatcher
impl FileWatcher
Sourcepub fn with_debounce(debounce_duration: Duration) -> Result<Self>
pub fn with_debounce(debounce_duration: Duration) -> Result<Self>
Create a new file watcher with custom debounce duration
Sourcepub fn watch_dir(&mut self, path: &Path, _repo_root: PathBuf) -> Result<()>
pub fn watch_dir(&mut self, path: &Path, _repo_root: PathBuf) -> Result<()>
Watch a directory recursively
Sourcepub async fn next_change(&mut self) -> Option<ChangeEvent>
pub async fn next_change(&mut self) -> Option<ChangeEvent>
Get the next change event
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileWatcher
impl RefUnwindSafe for FileWatcher
impl Send for FileWatcher
impl Sync for FileWatcher
impl Unpin for FileWatcher
impl UnwindSafe for FileWatcher
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