ReferenceWritableKeyPath

A writable key path whose replacement mutates the same root instance.

It intentionally inherits WritableKeyPath, as Swift's ReferenceWritableKeyPath inherits WritableKeyPath. Reducer frameworks may warn about mutable state, but should not reject this path at the type level.

Inheritors

Properties

Link copied to clipboard
abstract val __kpaths_id: PathId

Library-reserved structural identity metadata.

Link copied to clipboard

Library-reserved focused-value type metadata.

Functions

Link copied to clipboard

Appends a total read path.

Composition rooted in a reference-writable path remains reference-writable: setting the final focus updates the same outer root instance.

Appends two writable paths, retaining immutable replacement capability.

Link copied to clipboard

Appends a path after force-unwrapping a nullable focus.

Appends a writable path after force-unwrapping a nullable reference-owned focus.

Appends a writable path after force-unwrapping a nullable focus.

Link copied to clipboard

Optionally appends a read path after a nullable focus.

Link copied to clipboard
abstract fun get(root: Root): Value

Reads the focused value from root.

Link copied to clipboard
open override fun getAny(root: Root): Any?

Reads this path while erasing the focused value's static type.

Link copied to clipboard
open operator override fun invoke(root: Root): Value

Invokes this path as its total read function.

Link copied to clipboard
open fun modify(root: Root, update: (Value) -> Value): Root

Transforms the focused value and returns the resulting root.

Link copied to clipboard
open override fun set(root: Root, value: Value): Root

Replaces the focused value and returns the resulting root.

Link copied to clipboard
abstract fun setInPlace(root: Root, value: Value)

Replaces the focus by mutating root itself.

Link copied to clipboard

Kotlin-friendly spelling of appending.

Kotlin-friendly spelling of reference-writable appending.

Kotlin-friendly spelling of writable appending.

Link copied to clipboard

Kotlin-friendly spelling of optional key-path appendingOptional.