Skip to main content

apply_transition

Function apply_transition 

Source
pub const fn apply_transition(
    state: LifecycleState,
    transition: LifecycleTransition,
    result: TransitionResult,
) -> LifecycleState
Expand description

Apply a transition given the callback result.

Implements the REP-2002 transition table:

  • Success: move to the target state
  • Failure: roll back to the previous primary state
  • Error: move to ErrorProcessing