pub struct FileWatcherStub { /* private fields */ }Expand description
File watcher with debouncing, glob filtering, event batching, recursive directory watching, and dynamic watch management.
Implementations§
Source§impl FileWatcherStub
impl FileWatcherStub
pub fn new() -> Self
pub fn with_debounce(window: Duration) -> Self
pub fn watch(&mut self, path: &str)
pub fn watch_recursive( &mut self, path: &str, recursive: bool, ) -> Result<(), WatchError>
pub fn unwatch(&mut self, path: &str)
pub fn unwatch_checked(&mut self, path: &str) -> Result<(), WatchError>
pub fn update_recursive( &mut self, path: &str, recursive: bool, ) -> Result<(), WatchError>
pub fn replace_watches(&mut self, paths: &[&str])
pub fn watch_entry(&self, path: &str) -> Option<&WatchEntry>
pub fn watched_count(&self) -> usize
pub fn watched_paths(&self) -> &[String]
pub fn add_glob_filter(&mut self, pattern: &str) -> Result<(), WatchError>
pub fn clear_glob_filters(&mut self)
pub fn glob_filter_count(&self) -> usize
pub fn passes_glob_filter(&self, path: &str) -> bool
pub fn set_debounce_window(&mut self, window: Duration)
pub fn debounce_window(&self) -> Duration
pub fn inject_event(&mut self, event: FsEvent)
pub fn inject_event_unfiltered(&mut self, event: FsEvent)
pub fn inject_event_timed(&mut self, event: FsEvent, when: Instant)
pub fn drain_events(&mut self) -> Vec<FsEvent>
pub fn drain_events_debounced(&mut self) -> Vec<FsEvent>
pub fn set_batching(&mut self, enabled: bool)
pub fn batching_enabled(&self) -> bool
pub fn set_batch_callback<F>(&mut self, cb: F)
pub fn clear_batch_callback(&mut self)
pub fn flush_batches(&mut self) -> Vec<EventBatch>
pub fn flush_batches_debounced(&mut self) -> Vec<EventBatch>
pub fn batches(&self) -> &[EventBatch]
pub fn clear_batches(&mut self)
pub fn check_path(path: &str) -> Result<(), WatchError>
pub fn path_exists(path: &str) -> bool
Trait Implementations§
Source§impl Debug for FileWatcherStub
impl Debug for FileWatcherStub
Auto Trait Implementations§
impl Freeze for FileWatcherStub
impl !RefUnwindSafe for FileWatcherStub
impl Send for FileWatcherStub
impl Sync for FileWatcherStub
impl Unpin for FileWatcherStub
impl UnsafeUnpin for FileWatcherStub
impl !UnwindSafe for FileWatcherStub
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