def target_view
bendvy-ecs-core@0.1.0.3 · execution_relation_access.bend:32
import bendvy-ecs-core@0.1.0.3/execution_relation_access.bend as ExecutionRelationAccess
import Base
import bendvy-ecs-core@0.1.0.3/world.bend as W
import bendvy-ecs-core@0.1.0.3/relation_types.bend as T
import bendvy-ecs-core@0.1.0.3/relation_graph.bend as Graph
import bendvy-ecs-core@0.1.0.3/execution_relation_store.bend as Store
32def target_view(~S:Data,~descriptor:T.Descriptor<S>,+expected:U32,source:W.Handle<S>,view:Store.View<S,descriptor>) -> Lookup<Maybe<&2,W.Handle<S>>>:
33 match view:
34 case Store.View{+actual,graph,_,_,_}:target_namespace(~S,U32.is_eq(expected,actual),actual,Graph.target(~S,graph,descriptor,W.handle_key(~S,source)))