Skip to main content

Module time_debouncers

Module time_debouncers 

Source
Expand description

Time-based debouncers.

TimeDebouncers builds trailing debouncers that run after a quiet period, leading debouncers that run at most once per window, and trailing-value debouncers that deliver the latest value after a quiet period.

let d = TimeDebouncers::trailing(Duration::from_millis(200), || println!("fired"));
d.trigger();

Structs§

LeadingDebouncer
Runs the action immediately at most once per window; triggers inside the window are ignored.
TimeDebouncers
Factory for trailing, leading, and trailing-value debouncers.
TrailingDebouncer
Runs the action once after a quiet delay; each trigger restarts the timer.
TrailingValueDebouncer
Runs the action with the latest offered value of type T after a quiet delay.

Traits§

Debouncer
Debouncer without a payload: trailing or leading.
ValueDebouncer
Debouncer that delivers a payload of type T.