All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.internal.actions.ValueInfoAction.kt Maven / Gradle / Ivy

There is a newer version: 0.23.0
Show newest version
package io.kform.internal.actions

import io.kform.AbsolutePath
import io.kform.FormManager
import io.kform.ValueInfoHandler

/**
 * Action that calls [infoHandler] with the value-info of values at [path] and holds a lock over
 * said info until [infoHandler] finishes.
 */
internal class ValueInfoAction(
    formManager: FormManager,
    path: AbsolutePath,
    val infoHandler: ValueInfoHandler
) : ReadValueStateAction(formManager, path) {
    override fun toString() = "ValueInfo($path)"

    override suspend fun run() = infoHandler(valueInfo(path))
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy