Struct async_watcher::AsyncDebouncer
source · pub struct AsyncDebouncer<T: Watcher> { /* private fields */ }Implementations§
source§impl<T: Watcher> AsyncDebouncer<T>
impl<T: Watcher> AsyncDebouncer<T>
source§impl<T: Watcher> AsyncDebouncer<T>
impl<T: Watcher> AsyncDebouncer<T>
sourcepub async fn new_with_opts<F: AsyncDebounceEventHandler + Send + 'static>(
timeout: Duration,
tick_rate: Option<Duration>,
event_handler: F,
config: Config
) -> Result<Self, Error>
pub async fn new_with_opts<F: AsyncDebounceEventHandler + Send + 'static>( timeout: Duration, tick_rate: Option<Duration>, event_handler: F, config: Config ) -> Result<Self, Error>
Creates a new debounced watcher with custom configuration. The timeout specifies the amount of time that must elapse before an event is emitted, or a continuous event is sent (if there still are events incoming for the specific path). If tick_rate is set to None, then a tick rate will be selected that is less than the provided timeout.
source§impl AsyncDebouncer<RecommendedWatcher>
impl AsyncDebouncer<RecommendedWatcher>
sourcepub async fn new<F: AsyncDebounceEventHandler + Send + 'static>(
timeout: Duration,
tick_rate: Option<Duration>,
event_handler: F
) -> Result<Self, Error>
pub async fn new<F: AsyncDebounceEventHandler + Send + 'static>( timeout: Duration, tick_rate: Option<Duration>, event_handler: F ) -> Result<Self, Error>
Creates a new debounced watcher with the recommended watcher implementation. The timeout specifies the amount of time that must elapse before an event is emitted, or a continuous event is sent (if there still are events incoming for the specific path). If tick_rate is set to None, then a tick rate will be selected that is less than the provided timeout.
Trait Implementations§
Auto Trait Implementations§
impl<T> RefUnwindSafe for AsyncDebouncer<T>where T: RefUnwindSafe,
impl<T> Send for AsyncDebouncer<T>where T: Send,
impl<T> Sync for AsyncDebouncer<T>where T: Sync,
impl<T> Unpin for AsyncDebouncer<T>where T: Unpin,
impl<T> UnwindSafe for AsyncDebouncer<T>where T: UnwindSafe,
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