pub struct FileWatcherConfig {
pub debounce_ms: u64,
pub recursive: bool,
pub extensions: Vec<String>,
}Expand description
Configuration for the file watcher service.
Fields§
§debounce_ms: u64Debounce duration in milliseconds.
recursive: boolWhether to watch directories recursively.
extensions: Vec<String>File extensions to filter (empty = all files).
Implementations§
Source§impl FileWatcherConfig
impl FileWatcherConfig
Sourcepub fn with_debounce(self, ms: u64) -> Self
pub fn with_debounce(self, ms: u64) -> Self
Set debounce duration.
Sourcepub fn with_recursive(self, recursive: bool) -> Self
pub fn with_recursive(self, recursive: bool) -> Self
Set recursive mode.
Sourcepub fn with_extensions(self, exts: Vec<String>) -> Self
pub fn with_extensions(self, exts: Vec<String>) -> Self
Set file extensions to watch.
Sourcepub fn should_watch(&self, path: &Path) -> bool
pub fn should_watch(&self, path: &Path) -> bool
Check if a path should be watched based on extensions filter.
Trait Implementations§
Source§impl Clone for FileWatcherConfig
impl Clone for FileWatcherConfig
Source§fn clone(&self) -> FileWatcherConfig
fn clone(&self) -> FileWatcherConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FileWatcherConfig
impl Debug for FileWatcherConfig
Auto Trait Implementations§
impl Freeze for FileWatcherConfig
impl RefUnwindSafe for FileWatcherConfig
impl Send for FileWatcherConfig
impl Sync for FileWatcherConfig
impl Unpin for FileWatcherConfig
impl UnsafeUnpin for FileWatcherConfig
impl UnwindSafe for FileWatcherConfig
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