Enum DebounceResult
pub enum DebounceResult {
Pending {
rx: Receiver<String>,
extended: bool,
},
Passthrough(String),
}Expand description
Result of submitting a message to the debouncer.
Variants§
Pending
The message was accumulated and a timer is running. The caller should
skip processing — the debounced message will arrive via rx when the
window expires.
Fields
extended: boolfalse when this message opened a new accumulation bucket, true
when it extended one that was already open — the receiver handed
out for the bucket’s previous message resolves to Err, and this
receiver replaces it.
The distinction is decided under the debouncer’s own lock. A caller that keeps per-bucket state cannot reconstruct it afterwards: checking any mirror of “is the bucket still open” races the window expiry, and a bucket that fired in between would swallow a receiver belonging to the next one.
Passthrough(String)
Debouncing is disabled (window = 0); pass the message through immediately.