pub struct FileWatcher { /* private fields */ }Expand description
File watcher that monitors a directory for changes with 50ms debouncing.
Implementations§
Source§impl FileWatcher
impl FileWatcher
Sourcepub fn new(root: &Path) -> Result<Self, CodememError>
pub fn new(root: &Path) -> Result<Self, CodememError>
Create a new file watcher for the given root directory.
Sourcepub fn receiver(&self) -> &Receiver<WatchEvent>
pub fn receiver(&self) -> &Receiver<WatchEvent>
Get the receiver for watch events.
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