pub trait Timer: Future {
// Required method
fn reset_timer(self: Pin<&mut Self>);
}Expand description
A future which holds a deadline relative to now.
This is a future which will trigger at some point in the future. Operations
such as debounce, which need to move their deadline forward every time an
item is received from ther underlying stream. This method provides a way to
ask a future to resolve at some point in the future instead.
Required Methods§
Sourcefn reset_timer(self: Pin<&mut Self>)
fn reset_timer(self: Pin<&mut Self>)
Move the point at which this future resolves to some point in the future. If the future has already resolved before, calling this method will allow it to resolve again.