pub trait TurnRecognizer: Send + Sync {
// Required methods
fn name(&self) -> &'static str;
fn detect(&self, screen: &[String]) -> TurnState;
// Provided method
fn detect_input(&self, input: &TurnInput<'_>) -> TurnState { ... }
}Expand description
Reads a rendered screen (ANSI already stripped, one String per line) and
classifies the current turn state for a specific kind of TUI.
Required Methods§
Provided Methods§
Sourcefn detect_input(&self, input: &TurnInput<'_>) -> TurnState
fn detect_input(&self, input: &TurnInput<'_>) -> TurnState
Classify with the full input (screen + OSC evidence). Screen-only recognizers get this for free; the manifest recognizer overrides it to use OSC title/progress rules.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".