pub struct AsyncFileWatcher { /* private fields */ }Expand description
Simple file watcher that sends a notification whenever there was any changed in the watched file.
Implementations§
Source§impl AsyncFileWatcher
impl AsyncFileWatcher
pub fn new_file_changes_watcher<P: AsRef<Path>>( path: P, event_sender: FileWatcherEventSender, ) -> NotifyResult<Self>
pub fn new<P: AsRef<Path>>( path: P, event_sender: FileWatcherEventSender, filters: Option<Vec<EventKind>>, tick_duration: Option<Duration>, ) -> NotifyResult<Self>
pub fn with_filters(self, filters: Option<Vec<EventKind>>) -> Self
pub fn with_filter(self, filter: EventKind) -> Self
pub async fn watch(&mut self) -> NotifyResult<()>
pub fn is_watching(&self) -> bool
Auto Trait Implementations§
impl Freeze for AsyncFileWatcher
impl !RefUnwindSafe for AsyncFileWatcher
impl Send for AsyncFileWatcher
impl Sync for AsyncFileWatcher
impl Unpin for AsyncFileWatcher
impl !UnwindSafe for AsyncFileWatcher
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