Component
Actor
Process
Component Utility
Process Utility
{ init : ( Pid
, appFlags ) -> ( componentModel
, List componentMsgOut
, Platform.Cmd.Cmd componentMsgIn )
, update : componentMsgIn -> componentModel -> ( componentModel
, List componentMsgOut
, Platform.Cmd.Cmd componentMsgIn )
, subscriptions : componentModel -> Platform.Sub.Sub componentMsgIn
, view : (componentMsgIn -> frameworkMsg) -> componentModel -> (Pid -> Maybe output) -> output
}
{ processMethods : ProcessMethods componentModel appModel output frameworkMsg
, init : ( Pid
, appFlags ) -> ( appModel
, frameworkMsg )
, apply : componentModel -> Process appModel output frameworkMsg
}
fromComponent : { toAppModel : componentModel -> appModel, toAppMsg : componentMsgIn -> appMsg, fromAppMsg : appMsg -> Maybe componentMsgIn, onMsgOut : { self : Pid, msgOut : componentMsgOut } -> Framework.Internal.Message.FrameworkMessage appFlags appAddresses appActors appModel appMsg } -> Component appFlags componentModel componentMsgIn componentMsgOut output (Framework.Internal.Message.FrameworkMessage appFlags appAddresses appActors appModel appMsg) -> Actor appFlags componentModel appModel output (Framework.Internal.Message.FrameworkMessage appFlags appAddresses appActors appModel appMsg)
Progress a Component
into an Actor
by supplying it functions of how to
handle application types.
Framework.Internal.Actor.ProcessMethods componentModel appModel output frameworkMsg
Framework.Internal.Pid.Pid
The type of a Pid
spawnedBy : Pid -> Pid
Retrieve the Pid responsible for spawning the given Pid
altInit : ((( Pid, a ) -> ( componentModel, List componentMsgOut, Platform.Cmd.Cmd componentMsgIn )) -> ( Pid, appFlags ) -> ( componentModel, List componentMsgOut, Platform.Cmd.Cmd componentMsgIn )) -> Component a componentModel componentMsgIn componentMsgOut output frameworkMsg -> Component appFlags componentModel componentMsgIn componentMsgOut output frameworkMsg
Transform your components init function
altUpdate : ((componentMsgIn -> componentModel -> ( componentModel, List componentMsgOut, Platform.Cmd.Cmd componentMsgIn )) -> componentMsgIn -> componentModel -> ( componentModel, List componentMsgOut, Platform.Cmd.Cmd componentMsgIn )) -> Component appFlags componentModel componentMsgIn componentMsgOut output frameworkMsg -> Component appFlags componentModel componentMsgIn componentMsgOut output frameworkMsg
Transform your components update function
altSubscriptions : ((componentModel -> Platform.Sub.Sub componentMsgIn) -> componentModel -> Platform.Sub.Sub componentMsgIn) -> Component appFlags componentModel componentMsgIn componentMsgOut output frameworkMsg -> Component appFlags componentModel componentMsgIn componentMsgOut output frameworkMsg
Transform your components subscriptions function
altView : (((componentMsgIn -> frameworkMsg) -> componentModel -> (Pid -> Maybe outputA) -> outputA) -> (componentMsgIn -> frameworkMsg) -> componentModel -> (Pid -> Maybe outputB) -> outputB) -> Component appFlags componentModel componentMsgIn componentMsgOut outputA frameworkMsg -> Component appFlags componentModel componentMsgIn componentMsgOut outputB frameworkMsg
Transform your components view function
pidSystem : Pid
The System's Pid
pidCompare : Pid -> Pid -> Basics.Order
Compare two Pid's
pidEquals : Pid -> Pid -> Basics.Bool
Check if two Pid's are in fact the same
pidToInt : Pid -> Basics.Int
Returns an Integer representation of a Pid.
pidToString : Pid -> String
Returns a String representation of a Pid.
unsafePidFromInt : Basics.Int -> Pid
Create a Pid from an Int, should only be used when writing tests