ProjectionBinding
class ProjectionBinding<T : Any>(val type: ProjectionType, val identity: Any, val read: () -> T, val encode: (T) -> ProjectionValue, val decode: (ProjectionValue) -> T, val write: UiSession.(T) -> Unit)(source)
Typed owner-thread binding between a server-owned value and an optimistic client control. identity is a stable referential key, normally the caller-owned state object, and is never serialized. Reads and encoding occur during declaration projection; decoding validates input before write can run. The write callback runs only inside the server's ordinary input boundary.
Constructors
Link copied to clipboard
constructor(type: ProjectionType, identity: Any, read: () -> T, encode: (T) -> ProjectionValue, decode: (ProjectionValue) -> T, write: UiSession.(T) -> Unit)