def read

bendvy-ecs-core@0.1.0.4 · ordinary_app_resource_field_declaration.bend:41

import bendvy-ecs-core@0.1.0.4/ordinary_app_resource_field_declaration.bend as OrdinaryAppResourceFieldDeclaration
import Base
import bendvy-ecs-core@0.1.0.4/resource_field_binding.bend as Binding
import bendvy-ecs-core@0.1.0.4/resource_field.bend as Lens
import bendvy-ecs-core@0.1.0.4/ordinary_resource_field_system.bend as Field
import bendvy-ecs-core@0.1.0.4/ordinary_schema.bend as Schema
import bendvy-ecs-core@0.1.0.4/owner_product.bend as Product
import bendvy-ecs-core@0.1.0.4/world.bend as W

41# Declare selected-field read access through the canonical binding.
42# lens, identity and binding must describe the same field of resource owner R;
43# view threads the selected P back with Data V. The observer uses that same lens
44# and view, returning the World and siblings rather than exposing live aliases.
45# Construct bindings with resource-field-binding; do not supply a metadata-only
46# name as authority. No field operation runs while building this declaration.
47def read(~S:Data,~C:Type,~R:Type,~E:Data,~P:Type,~Rest:Type,~V:Data,~lens:Product.Lens<R,P,Rest>,~identity:Schema.Resource<S,P>,~binding:Binding.Binding<S,R,P,Rest,lens,identity>,~view:P -> P & V,~render:V -> String) -> Declaration<S,C,R,E,read_ops(~S,~P,~identity,~V),V>:
48  Declaration{Field.read(~S,~C,~R,~E,~P,~Rest,~V,~lens,~identity,~binding,~view),W.observe_resource(~S,~C,~R,~E,~V,~Lens.project(~R,~P,~Rest,~V,~lens,~view)),render}

Uses (10)

Used by (0)

No other definition uses this definition.