Struct Debouncer
Source struct Debouncer {
raw: bool,
raw_since: Instant,
stable: bool,
}
Expand description
Debounced level filter: a raw change must hold for DEBOUNCE before
the stable level follows it.
Raw level of the last poll.
Seeds both levels with stable, the known current level.
Feeds one poll of the raw level and returns the stable level.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
[From]<T> for U chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.