pub struct Debouncer { /* private fields */ }Expand description
Coalesces a burst of filesystem change notifications so a rapid series of
edits triggers a single re-index rather than one per event. The clock is
injected (now), so the logic is deterministic and unit-testable without
real sleeps — the seam the watcher loop drives with Instant::now().
Implementations§
Source§impl Debouncer
impl Debouncer
Sourcepub fn new(window: Duration) -> Self
pub fn new(window: Duration) -> Self
A debouncer that fires once the tree has been quiet for window.
Sourcepub fn is_pending(&self) -> bool
pub fn is_pending(&self) -> bool
Whether a change is waiting to be handled.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Debouncer
impl RefUnwindSafe for Debouncer
impl Send for Debouncer
impl Sync for Debouncer
impl Unpin for Debouncer
impl UnsafeUnpin for Debouncer
impl UnwindSafe for Debouncer
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