pub struct WatchEventProcessor { /* private fields */ }Expand description
Processes watch events and batches them for efficient handling.
This struct accumulates events and can be flushed to produce a batch of changes ready for processing.
Implementations§
Source§impl WatchEventProcessor
impl WatchEventProcessor
Sourcepub fn update_tracked_paths(&mut self, manifest: &Manifest)
pub fn update_tracked_paths(&mut self, manifest: &Manifest)
Update the set of tracked paths (call after tracking new files).
Sourcepub fn process(&mut self, event: WatchEvent) -> bool
pub fn process(&mut self, event: WatchEvent) -> bool
Process a watch event.
Returns true if the event was processed (not ignored).
Sourcepub fn flush(&mut self) -> WatchBatch
pub fn flush(&mut self) -> WatchBatch
Flush accumulated events into a batch.
Separates modified files into created (new) and modified (existing tracked).
Sourcepub fn has_pending(&self) -> bool
pub fn has_pending(&self) -> bool
Check if there are pending events.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WatchEventProcessor
impl RefUnwindSafe for WatchEventProcessor
impl Send for WatchEventProcessor
impl Sync for WatchEventProcessor
impl Unpin for WatchEventProcessor
impl UnsafeUnpin for WatchEventProcessor
impl UnwindSafe for WatchEventProcessor
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more