#[non_exhaustive]pub enum Debounce {
Inherit,
Off,
Custom(DebounceConfig),
}Expand description
A subscription’s debounce posture, resolved against the watcher-global default
(TributariesOptions::debounce) at delivery time.
Carried per watch on WatchOptions::with_debounce, it makes
disabled-vs-inherit-vs-custom a first-class three-way state: Off can
switch settling off for one subscription while the global coalescer stays on, and
Custom can switch it on (with its own windows) while the global
default is off — neither expressible with a bare Option<DebounceConfig>.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Inherit
Follow the watcher-global policy (TributariesOptions::debounce) — the default.
Off
Raw pass-through for this subscription, even when the watcher-global coalescer is on: its events ride through undelayed and uncollapsed, in admission order.
Custom(DebounceConfig)
This subscription’s own settle policy, overriding the watcher-global default — including enabling settling when the watcher-global debounce is off (which instantiates the coalescer on first use).
Implementations§
Source§impl Debounce
impl Debounce
Sourcepub const fn is_inherit(&self) -> bool
pub const fn is_inherit(&self) -> bool
Whether this is Inherit — follow the watcher-global policy.
Sourcepub const fn is_off(&self) -> bool
pub const fn is_off(&self) -> bool
Whether this is Off — raw pass-through for this subscription.
Sourcepub const fn is_custom(&self) -> bool
pub const fn is_custom(&self) -> bool
Whether this is Custom — the subscription’s own settle policy.
Sourcepub const fn as_custom(&self) -> Option<&DebounceConfig>
pub const fn as_custom(&self) -> Option<&DebounceConfig>
The subscription’s own settle policy, when this is Custom.