StatesManager

Properties

Link copied to clipboard
abstract val onChainStateUpdated: Flow<Pair<T, T>>
Link copied to clipboard
abstract val onEndChain: Flow<T>
Link copied to clipboard
abstract val onStartChain: Flow<T>

Functions

Link copied to clipboard
abstract suspend fun endChain(state: T)

Ends chain with context from state. In case when State.context of state is absent, state should be just ignored

Link copied to clipboard
abstract suspend fun getActiveStates(): List<T>
Link copied to clipboard
abstract suspend fun startChain(state: T)

Starts chain with state as first State. May returns false in case of State.context of state is already busy by the other State

Link copied to clipboard
abstract suspend fun update(old: T, new: T)

Must set current set using State.context