Package-level declarations
Functions
Link copied to clipboard
inline fun <T : Parcelable, S, S : MVIState, I : MVIIntent, A : MVIAction> StoreBuilder<S, I, A>.parcelizeState(handle: SavedStateHandle, context: CoroutineContext = Dispatchers.IO, key: String = key<T>(), behaviors: Set<<Error class: unknown class>> = SaveBehavior.Default, name: String? = "", resetOnException: Boolean = true, noinline recover: suspend (Exception) -> T? = ThrowRecover)
Creates and installs a new parcelizeStatePlugin.
Link copied to clipboard
inline fun <T : Parcelable, S, S : MVIState, I : MVIIntent, A : MVIAction> parcelizeStatePlugin(handle: SavedStateHandle, context: CoroutineContext = Dispatchers.IO, key: String = key<T>(), behaviors: Set<<Error class: unknown class>> = SaveBehavior.Default, resetOnException: Boolean = true, name: String? = "", noinline recover: suspend (Exception) -> T? = ThrowRecover): LazyPlugin<S, I, A>
Creates a new saveStatePlugin that saves the state value of given type T into a handle. Your state must be Parcelable to use this function.
Link copied to clipboard
inline fun <S : MVIState, I : MVIIntent, A : MVIAction> StoreBuilder<S, I, A>.saveState(saver: Saver<S>, context: CoroutineContext = EmptyCoroutineContext, behaviors: Set<SaveBehavior> = SaveBehavior.Default, name: String? = PluginNameSuffix, resetOnException: Boolean = true)
Creates and installs a new saveStatePlugin. Please see the parent overload for more info.
Link copied to clipboard
fun <S : MVIState, I : MVIIntent, A : MVIAction> saveStatePlugin(saver: Saver<S>, context: CoroutineContext = EmptyCoroutineContext, name: String? = PluginNameSuffix, behaviors: Set<SaveBehavior> = SaveBehavior.Default, resetOnException: Boolean = true): LazyPlugin<S, I, A>
Creates a plugin for persisting and restoring MVIState of the current store.
Link copied to clipboard
inline fun <T : S, S : MVIState, I : MVIIntent, A : MVIAction> StoreBuilder<S, I, A>.serializeState(path: String, serializer: KSerializer<T>, json: Json = DefaultJson, name: String? = "", behaviors: Set<SaveBehavior> = SaveBehavior.Default, context: CoroutineContext = Dispatchers.Default, resetOnException: Boolean = true, noinline recover: suspend (Exception) -> T? = ThrowRecover)
Install a serializeStatePlugin.
inline fun <T : S, S : MVIState, I : MVIIntent, A : MVIAction> StoreBuilder<S, I, A>.serializeState(dir: String, json: Json = DefaultJson, serializer: KSerializer<T>, behaviors: Set<SaveBehavior> = SaveBehavior.Default, fileExtension: String = ".json", filename: String = serializer.descriptor.serialName, name: String? = "", context: CoroutineContext = Dispatchers.Default, resetOnException: Boolean = true, noinline recover: suspend (Exception) -> T? = ThrowRecover)
Install a serializeStatePlugin.
Link copied to clipboard
inline fun <T : S, S : MVIState, I : MVIIntent, A : MVIAction> serializeStatePlugin(path: String, serializer: KSerializer<T>, json: Json = DefaultJson, behaviors: Set<SaveBehavior> = SaveBehavior.Default, name: String? = serializer.descriptor.serialName.plus(PluginNameSuffix), context: CoroutineContext = Dispatchers.Default, resetOnException: Boolean = true, noinline recover: suspend (Exception) -> T? = ThrowRecover): LazyPlugin<S, I, A>
An overload of saveStatePlugin that is configured with some default values for convenience.
inline fun <T : S, S : MVIState, I : MVIIntent, A : MVIAction> serializeStatePlugin(dir: String, serializer: KSerializer<T>, json: Json = DefaultJson, behaviors: Set<SaveBehavior> = SaveBehavior.Default, filename: String = serializer.descriptor.serialName, fileExtension: String = ".json", context: CoroutineContext = Dispatchers.Default, resetOnException: Boolean = true, name: String? = "", noinline recover: suspend (Exception) -> T? = ThrowRecover): LazyPlugin<S, I, A>
An overload of saveStatePlugin that is configured with some default values for convenience.