pub fn can_transition(from: LifecycleState, to: LifecycleState) -> bool
Whether from -> to is a legal step.
from -> to