pub struct FileWatcher { /* private fields */ }Expand description
File system watcher for watch mode
Implementations§
Source§impl FileWatcher
impl FileWatcher
Sourcepub fn new(config: WatchConfig) -> ProbarResult<Self>
pub fn new(config: WatchConfig) -> ProbarResult<Self>
Create a new file watcher
Sourcepub fn start(&mut self) -> ProbarResult<()>
pub fn start(&mut self) -> ProbarResult<()>
Start watching
Sourcepub fn check_changes(&mut self) -> Option<Vec<FileChange>>
pub fn check_changes(&mut self) -> Option<Vec<FileChange>>
Check for changes (non-blocking)
Sourcepub fn config(&self) -> &WatchConfig
pub fn config(&self) -> &WatchConfig
Get the configuration
Sourcepub fn is_running(&self) -> bool
pub fn is_running(&self) -> bool
Check if watcher is running
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 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