pub fn apply_transition(
from: AgentState,
terminal_reason: Option<TerminalReason>,
trigger: Trigger,
) -> Result<Transition, IllegalTransition>Expand description
Apply one lifecycle trigger to a record currently in from (with terminal_reason
if from is already Terminal), per the transition table in ADR-142 §1.