Skip to main content

map_stop_reason

Function map_stop_reason 

Source
pub fn map_stop_reason(stop_reason: &str) -> (WaitOutcome, Option<String>)
Expand description

Classify a harness stop reason.

Stop reasons are free text the harness chooses, so the comparison is case-insensitive and tolerates both end_turn and endTurn. Anything unrecognized is an error carrying the raw reason, because silently calling an unknown ending “finished” would tell the caller its work succeeded when nobody knows that it did.