Skip to main content

Debouncer

Trait Debouncer 

Source
pub trait Debouncer: Send + Sync {
    // Required methods
    fn trigger(&self);
    fn cancel_pending(&self) -> bool;
}
Expand description

Debouncer without a payload: trailing or leading.

Required Methods§

Source

fn trigger(&self)

Requests execution according to the debouncer policy.

Source

fn cancel_pending(&self) -> bool

Cancels a pending trailing execution. Returns true when one was pending. Leading debouncers have nothing pending and always return false.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§