Skip to main content

ValueDebouncer

Trait ValueDebouncer 

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

Debouncer that delivers a payload of type T.

Required Methods§

Source

fn trigger(&self, value: T)

Offers value, replacing any pending value, and (re)starts the delay.

Source

fn cancel_pending(&self) -> bool

Discards the pending value and timer. Returns true when one was pending.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<T> ValueDebouncer<T> for TrailingValueDebouncer<T>
where T: Clone + Send + Sync + 'static,