pub struct Debounce<T> { /* private fields */ }Expand description
Debounce struct enables calling the provided closure after a specified delay.
The delay is reset if another call is made before the delay duration has passed.
It holds an Option for a sender which is used to send messages to the worker thread.
It also holds an Option for a JoinHandle for the worker thread.
The debounce_config stores the closure and delay information.
§Fields
sender- AnOptionfor a sender which is used to send messages to the worker thread.thread- AnOptionfor a JoinHandle for the worker thread.debounce_config- Stores the closure and delay information.
Implementations§
Source§impl<T> Debounce<T>
impl<T> Debounce<T>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Debounce<T>
impl<T> !RefUnwindSafe for Debounce<T>
impl<T> Send for Debounce<T>where
T: Send,
impl<T> Sync for Debounce<T>where
T: Send,
impl<T> Unpin for Debounce<T>
impl<T> !UnwindSafe for Debounce<T>
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