Struct Debounce
pub struct Debounce {
pub window_ms: u64,
pub max_wait_ms: u64,
pub dedup_ms: u64,
}Expand description
How starts with one key are collapsed into one run.
Fields§
§window_ms: u64The run starts once this long passes without another start.
max_wait_ms: u64The run starts at most this long after the window’s first start (0: no bound, so a steady stream of starts can delay it forever).
dedup_ms: u64How long the key remembers event IDs after its last event.
Implementations§
Trait Implementations§
§impl<'de> Deserialize<'de> for Debounce
impl<'de> Deserialize<'de> for Debounce
§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Debounce
impl StructuralPartialEq for Debounce
Auto Trait Implementations§
impl Freeze for Debounce
impl RefUnwindSafe for Debounce
impl Send for Debounce
impl Sync for Debounce
impl Unpin for Debounce
impl UnsafeUnpin for Debounce
impl UnwindSafe for Debounce
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