trySet

fun <T> StateContainer<T>.trySet(newState: T): Boolean

Attempts to set the state to a specific value.