pub struct Debouncer<T: Watcher, C: FileIdCache> { /* private fields */ }
Expand description
Debouncer guard, stops the debouncer on drop.
Implementations§
Source§impl<T: Watcher, C: FileIdCache> Debouncer<T, C>
impl<T: Watcher, C: FileIdCache> Debouncer<T, C>
Sourcepub fn stop(self)
pub fn stop(self)
Stop the debouncer, waits for the event thread to finish.
May block for the duration of one tick_rate
.
Sourcepub fn stop_nonblocking(self)
pub fn stop_nonblocking(self)
Stop the debouncer, does not wait for the event thread to finish.
pub fn watcher(&mut self)
👎Deprecated:
Debouncer
provides all methods from Watcher
itself now. Remove .watcher()
and use those methods directly.pub fn cache(&mut self)
👎Deprecated:
Debouncer
now manages root paths automatically. Remove all calls to add_root
and remove_root
.pub fn watch( &mut self, path: impl AsRef<Path>, recursive_mode: RecursiveMode, ) -> Result<()>
pub fn unwatch(&mut self, path: impl AsRef<Path>) -> Result<()>
pub fn configure(&mut self, option: Config) -> Result<bool>
pub fn kind() -> WatcherKindwhere
Self: Sized,
Trait Implementations§
Auto Trait Implementations§
impl<T, C> Freeze for Debouncer<T, C>where
T: Freeze,
impl<T, C> !RefUnwindSafe for Debouncer<T, C>
impl<T, C> Send for Debouncer<T, C>
impl<T, C> Sync for Debouncer<T, C>
impl<T, C> Unpin for Debouncer<T, C>where
T: Unpin,
impl<T, C> !UnwindSafe for Debouncer<T, C>
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