Package-level declarations

Types

Link copied to clipboard
data class ContainerContext<S : Any, SE : Any>(val settings: RealSettings, val postSideEffect: suspend (SE) -> Unit, val reduce: suspend ((S) -> S) -> Unit, val subscribedCounter: SubscribedCounter, val stateFlow: StateFlow<S>)
Link copied to clipboard
data class IntentContext<STATE : Any>(val state: STATE)

Represents the current context in which a simple orbit is executing.

Link copied to clipboard
interface Operator<S : Any, E>
Link copied to clipboard
data class SubStateContainerContext<S : Any, SE : Any, T : S>(val settings: RealSettings, val postSideEffect: suspend (SE) -> Unit, getState: () -> T, val reduce: suspend ((T) -> S) -> Unit, val subscribedCounter: SubscribedCounter)
Link copied to clipboard
class SubStateSyntax<S : Any, SE : Any, T : S>(containerContext: SubStateContainerContext<S, SE, T>)
Link copied to clipboard
class Syntax<S : Any, SE : Any>(val containerContext: ContainerContext<S, SE>)

Functions

Link copied to clipboard
inline suspend fun <S : Any, T : S> Flow<S>.runOn(crossinline predicate: (T) -> Boolean = { true }, crossinline block: suspend (capturedState: T) -> Unit)

This API is intended to simplify and add type-safety to working with sealed class states. This can be applied to any Flow of states, not just the Container's own. The main purpose of this API is to help you work with child container states.

Link copied to clipboard
inline fun <S : Any, SE : Any, T : S> ContainerContext<S, SE>.toSubclassContainerContext(crossinline predicate: (T) -> Boolean = { true }, capturedState: T): SubStateContainerContext<S, SE, T>