pub struct FileWatcher { /* private fields */ }Expand description
Multi-subscriber file watcher built on top of notify.
Implementations§
Source§impl FileWatcher
impl FileWatcher
Sourcepub fn new() -> Result<Self>
pub fn new() -> Result<Self>
Creates a live filesystem watcher and starts its background event loop on the current Tokio runtime.
Sourcepub fn noop() -> Self
pub fn noop() -> Self
Creates an inert watcher that only supports test-driven synthetic notifications.
Sourcepub fn add_subscriber(self: &Arc<Self>) -> (FileWatcherSubscriber, Receiver)
pub fn add_subscriber(self: &Arc<Self>) -> (FileWatcherSubscriber, Receiver)
Adds a new subscriber and returns both its registration handle and its dedicated event receiver.
Auto Trait Implementations§
impl Freeze for FileWatcher
impl RefUnwindSafe for FileWatcher
impl Send for FileWatcher
impl Sync for FileWatcher
impl Unpin for FileWatcher
impl UnsafeUnpin for FileWatcher
impl UnwindSafe for FileWatcher
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