bcardiff/elm-rad/1.0.0

Rad.Internal.Engine

Engine-author API. App authors never import this module.

type alias Msg model =
Msg model

The runtime message type. Opaque. Engines construct values via fromAction or fromDebouncedInput; the runtime may add internal variants without breaking engines.

type alias ViewEngine view model =
{ toHtml : Registry -> view -> Html (Msg model) }

A view engine transforms the engine's view type into Html (Msg model).

fromAction : Action model -> Msg model

Convert a user-level action into a runtime message that engines can attach to event handlers.

fromDebouncedInput : DebouncedCell a -> a -> Msg model

Construct a runtime message that writes value to a debounced cell's raw slot and schedules a Process.sleep timer that commits raw → settled after the cell's configured delay. Used by view engines on onInput for debounced bindings.

Engines that want a raw write without scheduling a timer should use Rad.View.bindDebouncedWith with a trigger list that excludes OnTimeout (that binding dispatches a plain Action instead).

applyMsg : Msg model -> Registry -> Registry

Apply a runtime message to the registry. Used by the Layer 0-1 runtime wrapper; reaction and debounced messages are handled by the runtime directly.