def cached_read
bendvy-ecs-core@0.1.0.3 · execution_relation_failure_provider.bend:28
import bendvy-ecs-core@0.1.0.3/execution_relation_failure_provider.bend as ExecutionRelationFailureProvider
import Base
import bendvy-ecs-core@0.1.0.3/execution_composer_layout.bend as Layout
import bendvy-ecs-core@0.1.0.3/execution_relation_store.bend as Store
import bendvy-ecs-core@0.1.0.3/execution_relation_failure_access.bend as Access
import bendvy-ecs-core@0.1.0.3/execution_state.bend as State
import bendvy-ecs-core@0.1.0.3/relation_types.bend as T
import bendvy-ecs-core@0.1.0.3/execution_resource_access.bend as ResourceAccess
import bendvy-ecs-core@0.1.0.3/execution_relation_failure_channel.bend as Reader
28def cached_read(~S:Data,~descriptor:T.Descriptor<S>,~full:Layout.Layout,~route:Layout.Route,~C:Type,~R:Type,cap:ResourceAccess.Reader<State.Scope<S,C,R>,Store.View<S,descriptor>>,reader:Reader.Reader<S,descriptor,full,route>,scope:State.Scope<S,C,R>) -> State.Scope<S,C,R> & Reader.Reading<S,descriptor,full,route>:
29 match cap scope:
30 case ResourceAccess.UnsupportedReader{} scope:(scope,Reader.Refused{reader})
31 case ResourceAccess.Reader{get} State.Scope{columns,resources,handles,+tick,prior,+view}:Access.cached_returned(~S,~descriptor,~full,~route,~State.Scope<S,C,R>,Access.view_namespace(~S,view),tick,reader,get(State.Scope{columns,resources,handles,tick,prior,view}))