pub struct FileWatcher { /* private fields */ }
Expand description
File watcher for monitoring file system changes
Implementations§
Source§impl FileWatcher
impl FileWatcher
Sourcepub async fn watch_path(
&mut self,
path: impl AsRef<Path>,
recursive: bool,
) -> Result<()>
pub async fn watch_path( &mut self, path: impl AsRef<Path>, recursive: bool, ) -> Result<()>
Start watching a path
Sourcepub async fn unwatch_path(&mut self, path: impl AsRef<Path>) -> Result<()>
pub async fn unwatch_path(&mut self, path: impl AsRef<Path>) -> Result<()>
Stop watching a path
Sourcepub fn subscribe(&self) -> Receiver<FileChangeEvent>
pub fn subscribe(&self) -> Receiver<FileChangeEvent>
Subscribe to file change events
Auto Trait Implementations§
impl !Freeze for FileWatcher
impl !RefUnwindSafe for FileWatcher
impl Send for FileWatcher
impl Sync for FileWatcher
impl Unpin 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
§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.