pub struct FileWatcher { /* private fields */ }Expand description
File system watcher that detects changes in a project directory.
Implementations§
Source§impl FileWatcher
impl FileWatcher
Sourcepub fn new(root: &Path, config: &WatchConfig) -> Result<Self>
pub fn new(root: &Path, config: &WatchConfig) -> Result<Self>
Create a new file watcher for the given directory.
Sourcepub fn wait_for_changes(&mut self) -> Vec<PathBuf>
pub fn wait_for_changes(&mut self) -> Vec<PathBuf>
Wait for file changes and return the changed paths (debounced). This blocks until changes are detected.
Auto Trait Implementations§
impl Freeze for FileWatcher
impl !RefUnwindSafe for FileWatcher
impl Send for FileWatcher
impl !Sync for FileWatcher
impl Unpin for FileWatcher
impl UnsafeUnpin 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