def guard_selected

bendvy-ecs-core@0.1.0.3 · dependency_application.bend:58

import bendvy-ecs-core@0.1.0.3/dependency_application.bend as DependencyApplication
import Base
import bendvy-ecs-core@0.1.0.3/dependency_executor.bend as Exec

58def guard_selected(~World:Type,~Owners:Type,~Guards:Type,~Handler:Type,~Error:Data,~Out:Data,~dispatch:Owners -> World -> U32 -> Owners & (World & Exec.Invocation<Error,Out>),~guardDispatch:Guards -> World -> U32 -> Guards & (World & Exec.Invocation<Error,Bool>),~handle:Handler -> Error -> Handler & Exec.Handling,selected:Maybe<&2,U32>,state:State<World,Owners,Guards,Handler>) -> State<World,Owners,Guards,Handler> & Exec.Condition<Error>:
59  match selected state:
60    case None{} state:(state,Exec.Allowed{})
61    case Some{id} State{world,owners,guards,handler,bindings}:guard_returned(~World,~Owners,~Guards,~Handler,~Error,~Out,~dispatch,~guardDispatch,~handle,guardDispatch(guards,world,id),owners,handler,bindings)

Uses (10)

Used by (1)