pub enum WatchEvent {
Create,
Delete,
Update,
DebugWatch,
}Expand description
Type of file system event.
These events correspond to inotify events, but are simplified into three categories that cover most use cases.
Variants§
Create
File or directory was created.
Also triggered when a file/directory is moved into a watched directory.
Delete
File or directory was deleted.
Also triggered when a file/directory is moved out of a watched directory.
Update
File content was modified.
Triggered on IN_MODIFY (content changed) or IN_CLOSE_WRITE (file
opened for writing was closed). Directory content changes (files added/removed)
are reported as Create/Delete instead.
DebugWatch
Debug event: a watch was added on this directory.
Only emitted when WatchBuilder::debug_watches is enabled. Useful for
understanding which directories are being watched based on your patterns.
Trait Implementations§
Source§impl Clone for WatchEvent
impl Clone for WatchEvent
Source§fn clone(&self) -> WatchEvent
fn clone(&self) -> WatchEvent
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 WatchEvent
impl Debug for WatchEvent
Source§impl PartialEq for WatchEvent
impl PartialEq for WatchEvent
impl Copy for WatchEvent
impl Eq for WatchEvent
impl StructuralPartialEq for WatchEvent
Auto Trait Implementations§
impl Freeze for WatchEvent
impl RefUnwindSafe for WatchEvent
impl Send for WatchEvent
impl Sync for WatchEvent
impl Unpin for WatchEvent
impl UnwindSafe for WatchEvent
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