pub trait DebouncedTimeoutExt: Stop + Sized {
// Provided methods
fn with_debounced_timeout(
self,
duration: Duration,
) -> DebouncedTimeout<Self> { ... }
fn with_debounced_deadline(
self,
deadline: Instant,
) -> DebouncedTimeout<Self> { ... }
}Expand description
Extension trait for creating DebouncedTimeout wrappers.
Automatically implemented for all Stop types when the std feature
is enabled.
Provided Methods§
Sourcefn with_debounced_timeout(self, duration: Duration) -> DebouncedTimeout<Self>
fn with_debounced_timeout(self, duration: Duration) -> DebouncedTimeout<Self>
Add a debounced timeout to this stop.
Like TimeoutExt::with_timeout,
but skips most Instant::now() calls by learning the call rate.
Default target interval between clock reads: 100μs.
Sourcefn with_debounced_deadline(self, deadline: Instant) -> DebouncedTimeout<Self>
fn with_debounced_deadline(self, deadline: Instant) -> DebouncedTimeout<Self>
Add a debounced timeout with an absolute deadline.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.