referenceWritableKeyPath

fun <Root : Any, Value> referenceWritableKeyPath(id: PathId, valueType: TypeId, get: (Root) -> Value, set: (Root, Value) -> Unit, rootClass: KClass<*>? = null): ReferenceWritableKeyPath<Root, Value>

Creates a path whose replacement mutates the supplied root instance.


inline fun <Root : Any, Value> referenceWritableKeyPath(id: PathId, noinline get: (Root) -> Value, noinline set: (Root, Value) -> Unit): ReferenceWritableKeyPath<Root, Value>

Creates a reference-writable path while capturing its complete focus type token at the call site.


inline fun <Root : Any, Value> referenceWritableKeyPath(name: String, noinline get: (Root) -> Value, noinline set: (Root, Value) -> Unit): ReferenceWritableKeyPath<Root, Value>

Creates a custom in-place writable path with a root-local stable name.

The root's complete type token is captured automatically. Use the PathId-taking overload only when a custom multi-segment identity is necessary.


@JvmName(name = "arrayReferenceWritableKeyPathAt")
inline fun <Value> referenceWritableKeyPath(noinline get: (Array<Value>, Int) -> Value, noinline set: (Array<Value>, Int, Value) -> Unit, at: Int): ReferenceWritableKeyPath<Array<Value>, Value>

Creates an in-place path through an Array's indexed get and set operations at at.


@JvmName(name = "mutableListReferenceWritableKeyPathAt")
inline fun <Value> referenceWritableKeyPath(noinline get: (MutableList<Value>, Int) -> Value, noinline set: (MutableList<Value>, Int, Value) -> Unit, at: Int): ReferenceWritableKeyPath<MutableList<Value>, Value>

Creates an in-place path through a MutableList's indexed get and set operations at at.


Creates an in-place path through a MutableMap's lookup operation at key.


fun <Root : Any, Value> referenceWritableKeyPath(property: KMutableProperty1<Root, Value>, id: PathId, valueType: TypeId, rootClass: KClass<*>? = null): ReferenceWritableKeyPath<Root, Value>

Adapts a mutable Kotlin property reference into an in-place mutable path.


Adapts a mutable property reference while capturing its complete root and focus type tokens.