pub struct FileWatcher {
debouncer: Debouncer<RecommendedWatcher, RecommendedCache>,
}Expand description
File system watcher with debouncing.
Fields§
§debouncer: Debouncer<RecommendedWatcher, RecommendedCache>Implementations§
Source§impl FileWatcher
impl FileWatcher
Sourcepub fn new(
event_tx: Sender<FileEvent>,
debounce_duration: Duration,
) -> Result<Self, Error>
pub fn new( event_tx: Sender<FileEvent>, debounce_duration: Duration, ) -> Result<Self, Error>
Create a new file watcher.
Sourcepub fn with_pending(
event_tx: Sender<FileEvent>,
debounce_duration: Duration,
pending: Option<Arc<AtomicUsize>>,
) -> Result<Self, Error>
pub fn with_pending( event_tx: Sender<FileEvent>, debounce_duration: Duration, pending: Option<Arc<AtomicUsize>>, ) -> Result<Self, Error>
Create a watcher that increments pending for each queued event.
Auto Trait Implementations§
impl !RefUnwindSafe for FileWatcher
impl !UnwindSafe for FileWatcher
impl Freeze for FileWatcher
impl Send for FileWatcher
impl Sync for FileWatcher
impl Unpin for FileWatcher
impl UnsafeUnpin 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> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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