#[non_exhaustive]pub enum EventKind {
Matched {
output: DetectorOutput,
},
Changed {
old: Option<DetectorOutput>,
new: DetectorOutput,
},
ThresholdCrossed {
value: f64,
direction: ThresholdDirection,
},
TemplateAppeared {
score: f32,
},
TemplateVanished,
WatcherDegraded {
consecutive_errors: u32,
},
TargetLost,
TargetReattached,
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Matched
Every-match mode: the detector matched this tick.
Fields
§
output: DetectorOutputChanged
Change mode (default): the detector’s output transitioned.
old is None on the first evaluation.
ThresholdCrossed
Threshold mode: the predicate flipped.
TemplateAppeared
Template mode: the best match score rose to or above the threshold.
TemplateVanished
Template mode: the best match score fell below the threshold.
WatcherDegraded
The detector failed repeatedly; the watcher keeps running.
TargetLost
The capture target disappeared (e.g. the watched window closed).
Session-wide: delivered to every subscriber. Watchers stay registered;
a TargetReattached follows if the target comes back.
TargetReattached
A previously lost capture target is available again. Session-wide.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EventKind
impl RefUnwindSafe for EventKind
impl Send for EventKind
impl Sync for EventKind
impl Unpin for EventKind
impl UnsafeUnpin for EventKind
impl UnwindSafe for EventKind
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