Skip to main content

palette_intent

Function palette_intent 

Source
pub fn palette_intent(command: &Command, pane: &str, tick: u64) -> Result<Expr>
Expand description

Reduces a chosen Command to its matching validated Intent for pane at tick.

The required fields of each Intent kind are filled from the command and the active pane: an CommandKind::Invoke becomes intent/invoke (target/op/args); CommandKind::Ask becomes intent/ask (mission/question); CommandKind::Open becomes intent/open (value/pane). The result is re-checked with validate_intent before it is returned, so a caller never sees a malformed Intent.