pub fn validate_transition(
from: InstanceStatus,
to: InstanceStatus,
) -> Result<()>Expand description
Validate that a state transition is allowed.
Returns Ok(()) if the transition is valid, Err with explanation otherwise. Enforces the state machine defined in the spec.