#[non_exhaustive]pub enum DetectorOutput {
Bool(bool),
Text(String),
Number(f64),
Score(f32),
Spans(Vec<TextSpan>),
None,
}Expand description
What a detector produced this tick.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Bool(bool)
Gates and presence checks. Bool(false) means “no match” / “gate closed”.
Text(String)
OCR’d text.
Number(f64)
A parsed numeric value (HP, gold, timer).
Must never be NaN: change detection compares outputs with PartialEq,
and NaN != NaN would fire a spurious change event every tick. Detectors
that fail to parse a number must return None or an Err instead.
Score(f32)
A template-match confidence score in 0.0..=1.0. Must never be NaN
(same rule as Number).
Spans(Vec<TextSpan>)
OCR’d text with per-span geometry and confidence preserved
(bbox-ordered, the same order Text mode joins in).
Equality — and therefore Change-mode transition detection — compares
span texts only. Bounding boxes and confidences jitter frame to
frame under real OCR; if they participated in PartialEq, a static
tooltip would fire a change event on every tick.
None
Nothing detected this tick.
Implementations§
Trait Implementations§
Source§impl Clone for DetectorOutput
impl Clone for DetectorOutput
Source§fn clone(&self) -> DetectorOutput
fn clone(&self) -> DetectorOutput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DetectorOutput
impl Debug for DetectorOutput
Source§impl PartialEq for DetectorOutput
Manual impl: identical to the derive for every variant except Spans,
which compares the ordered sequence of span texts (see the variant doc).
impl PartialEq for DetectorOutput
Manual impl: identical to the derive for every variant except Spans,
which compares the ordered sequence of span texts (see the variant doc).