pub struct RootWatcher { /* private fields */ }Expand description
A running recursive watch over one root.
Owns both the notify watcher and the debounce thread; dropping it stops both.
Implementations§
Source§impl RootWatcher
impl RootWatcher
Sourcepub fn start<F>(
root: &Path,
window: Duration,
filter: RelevanceFilter,
sink: F,
) -> Option<Self>
pub fn start<F>( root: &Path, window: Duration, filter: RelevanceFilter, sink: F, ) -> Option<Self>
Start watching root recursively, emitting coalesced path batches to sink.
Returns None if the OS refuses the watch (too many watches, unreadable root) —
a workspace without live updates is degraded, not broken, so the caller carries on.
Trait Implementations§
Source§impl Drop for RootWatcher
impl Drop for RootWatcher
Auto Trait Implementations§
impl !RefUnwindSafe for RootWatcher
impl !UnwindSafe for RootWatcher
impl Freeze for RootWatcher
impl Send for RootWatcher
impl Sync for RootWatcher
impl Unpin for RootWatcher
impl UnsafeUnpin for RootWatcher
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