webbhuset / elm-actor-model-elm-ui / Webbhuset.ElmUI.Actor

Actor for Elm UI

This module has an identical API to Webbhuset.Actor but with the view functions returning Element msg.

Check Webbhuset.Actor for more info.


type alias PID =
Webbhuset.PID.PID

A PID is an identifier for a Process.

Create Actors from Components

fromUI : { wrapModel : compModel -> appModel, wrapMsg : msgIn -> appMsg, mapIn : appMsg -> Maybe msgIn, mapOut : PID -> msgOut -> SysMsg name appMsg } -> Webbhuset.ElmUI.Component.UI compModel msgIn msgOut -> Actor compModel appModel (SysMsg name appMsg)

Create an actor from a UI Component

fromService : { wrapModel : compModel -> appModel, wrapMsg : msgIn -> appMsg, mapIn : appMsg -> Maybe msgIn, mapOut : PID -> msgOut -> SysMsg name appMsg } -> Webbhuset.ElmUI.Component.Service compModel msgIn msgOut -> Actor compModel appModel (SysMsg name appMsg)

Create an actor from a Service Component

fromLayout : { wrapModel : compModel -> appModel, wrapMsg : msgIn -> appMsg, mapIn : appMsg -> Maybe msgIn, mapOut : PID -> msgOut -> SysMsg name appMsg } -> Webbhuset.ElmUI.Component.Layout compModel msgIn msgOut (SysMsg name appMsg) -> Actor compModel appModel (SysMsg name appMsg)

Create an actor from a Layout Component

Bootstrap


type alias Actor compModel appModel msg =
Webbhuset.ActorSystem.Actor compModel appModel (Element msg) msg

An actor is acomponent where the types are wrapped to fit the System types.