Package-level declarations

Functions

Link copied to clipboard
fun InstanceKeeper.retainedScope(context: CoroutineContext = Dispatchers.Main.immediateOrDefault, key: Any = CoroutineScope::class): CoroutineScope
fun InstanceKeeperOwner.retainedScope(context: CoroutineContext = Dispatchers.Main.immediateOrDefault, key: Any = CoroutineScope::class): CoroutineScope

Creates OR obtains a CoroutineScope instance that is retained across configuration changes using this InstanceKeeper.

Link copied to clipboard
inline fun <S : MVIState, I : MVIIntent, A : MVIAction> InstanceKeeper.retainedStore(scope: CoroutineScope? = retainedScope(), factory: () -> Store<S, I, A>): Store<S, I, A>
@JvmName(name = "subscribeContainerFactory")
inline fun <S : MVIState, I : MVIIntent, A : MVIAction> InstanceKeeperOwner.retainedStore(scope: CoroutineScope? = retainedScope(), factory: () -> Container<S, I, A>): Store<S, I, A>
inline fun <S : MVIState, I : MVIIntent, A : MVIAction> InstanceKeeperOwner.retainedStore(scope: CoroutineScope? = retainedScope(), factory: () -> Store<S, I, A>): Store<S, I, A>
@JvmName(name = "retainedInstanceKeeperStoreFactory")
inline fun <S : MVIState, I : MVIIntent, A : MVIAction> InstanceKeeper.retainedStore(key: Any, scope: CoroutineScope? = retainedScope(), factory: () -> Store<S, I, A>): Store<S, I, A>
@JvmName(name = "retainedInstanceKeeperOwnerStoreFactory")
inline fun <S : MVIState, I : MVIIntent, A : MVIAction> InstanceKeeperOwner.retainedStore(key: Any, scope: CoroutineScope? = retainedScope(), factory: () -> Store<S, I, A>): Store<S, I, A>

Creates and retains a new Store instance provided using factory using this InstanceKeeper.

inline fun <T : Container<S, I, A>, InstanceKeeperOwner, S : MVIState, I : MVIIntent, A : MVIAction> T.retainedStore(initial: S, scope: CoroutineScope? = retainedScope(), builder: BuildStore<S, I, A>): Store<S, I, A>
inline fun <S : MVIState, I : MVIIntent, A : MVIAction> InstanceKeeper.retainedStore(initial: S, scope: CoroutineScope? = retainedScope(), builder: BuildStore<S, I, A>): Store<S, I, A>
inline fun <S : MVIState, I : MVIIntent, A : MVIAction> InstanceKeeperOwner.retainedStore(initial: S, scope: CoroutineScope? = retainedScope(), builder: BuildStore<S, I, A>): Store<S, I, A>
inline fun <T : Container<S, I, A>, InstanceKeeperOwner, S : MVIState, I : MVIIntent, A : MVIAction> T.retainedStore(initial: S, key: Any, scope: CoroutineScope? = retainedScope(), builder: BuildStore<S, I, A>): Store<S, I, A>
inline fun <S : MVIState, I : MVIIntent, A : MVIAction> InstanceKeeper.retainedStore(initial: S, key: Any, scope: CoroutineScope? = retainedScope(), builder: BuildStore<S, I, A>): Store<S, I, A>
inline fun <S : MVIState, I : MVIIntent, A : MVIAction> InstanceKeeperOwner.retainedStore(initial: S, key: Any, scope: CoroutineScope? = retainedScope(), builder: BuildStore<S, I, A>): Store<S, I, A>

Creates and retains a new Store instance built using builder using this InstanceKeeper.

@JvmName(name = "retainedContainerFactory")
inline fun <S : MVIState, I : MVIIntent, A : MVIAction> InstanceKeeperOwner.retainedStore(key: Any, scope: CoroutineScope? = retainedScope(), factory: () -> Container<S, I, A>): Store<S, I, A>

Creates and retains a new Store instance provided using factory using this InstanceKeeperOwner.

Link copied to clipboard
@JvmName(name = "subscribeContainer")
inline fun <T : LifecycleOwner, ImmutableContainer<S, I, A>, S : MVIState, I : MVIIntent, A : MVIAction> T.subscribe(scope: CoroutineScope = coroutineScope(), mode: SubscriptionMode = SubscriptionMode.Started, crossinline block: suspend Provider<S, I, A>.() -> Unit): Job
@JvmName(name = "subscribeStore")
inline fun <T : LifecycleOwner, ImmutableStore<S, I, A>, S : MVIState, I : MVIIntent, A : MVIAction> T.subscribe(scope: CoroutineScope = coroutineScope(), mode: SubscriptionMode = SubscriptionMode.Started, crossinline block: suspend Provider<S, I, A>.() -> Unit): Job

Subscribe to the Container.store of this container in the scope of this LifecycleOwner's lifecycle.

inline fun <S : MVIState, I : MVIIntent, A : MVIAction> Lifecycle.subscribe(store: ImmutableStore<S, I, A>, scope: CoroutineScope, mode: SubscriptionMode = SubscriptionMode.Started, crossinline block: suspend Provider<S, I, A>.() -> Unit): Job
inline fun <S : MVIState, I : MVIIntent, A : MVIAction> LifecycleOwner.subscribe(store: ImmutableStore<S, I, A>, scope: CoroutineScope = coroutineScope(), mode: SubscriptionMode = SubscriptionMode.Started, crossinline block: suspend Provider<S, I, A>.() -> Unit): Job

Subscribe to the store in the scope of this LifecycleOwner's lifecycle.