ProjectionAction

class ProjectionAction<T : Any>(val type: ProjectionType, decode: (ProjectionValue) -> T, handle: UiSession.(T) -> Unit)(source)

Server-owned typed event endpoint. The decoder validates untrusted detached data before the handler receives a value. The runtime owns this endpoint only while its declaring node and generation remain active.

Constructors

Link copied to clipboard
constructor(type: ProjectionType, decode: (ProjectionValue) -> T, handle: UiSession.(T) -> Unit)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun dispatch(session: UiSession, value: ProjectionValue)

Validates and delivers one event on the owning session thread.

Link copied to clipboard

Validates untrusted data before returning an owner-thread operation that invokes the handler. A decoder failure never invokes the handler.