def read

bendvy-ecs-core@0.1.0.4 · ordinary_resource_system.bend:18

import bendvy-ecs-core@0.1.0.4/ordinary_resource_system.bend as OrdinaryResourceSystem
import Base
import bendvy-ecs-core@0.1.0.4/ordinary_schema.bend as Schema
import bendvy-ecs-core@0.1.0.4/ordinary_query_declaration.bend as Query
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/resource.bend as Res
import bendvy-ecs-core@0.1.0.4/transaction.bend as T
import bendvy-ecs-core@0.1.0.4/capabilities.bend as Cap

18# Build whole-resource read declaration exposing detached V through an owner-
19# returning projector. This supplies no setter and does not copy the actual R.
20def read(~S:Data,~C:Type,~R:Type,~E:Data,~V:Data,~project:R -> R & V,identity:Schema.Resource<S,R>) -> Declaration<S,R,T.Tx<W.World<S,C,R,E>,E>,Cap.ValueRead<T.Tx<W.World<S,C,R,E>,E>,V>>:
21  Declaration{identity,Query.Read{},Cap.ValueRead{Res.tx_get(~S,~C,~R,~E,~V,~project)}}

Uses (8)

Used by (1)