onDestroyed

inline fun StateMachine.onDestroyed(crossinline block: suspend StateMachine.() -> Unit): StateMachine.Listener