def snapshot

bendvy-ecs-core@0.1.0.4 · ordinary_app_dump.bend:66

import bendvy-ecs-core@0.1.0.4/ordinary_app_dump.bend as OrdinaryAppDump
import Base
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/ordinary_app_composer.bend as Build
import bendvy-ecs-core@0.1.0.4/ordinary_app_registration_fields.bend as Records
import bendvy-ecs-core@0.1.0.4/ordinary_app_observation_data.bend as DTO
import bendvy-ecs-core@0.1.0.4/ordinary_dump_filter.bend as Filter

66# Return the App and optional filtered dump. Disabled returns None before handle
67# scanning or presentation. Enabled scans live handles in their existing order;
68# entity keys and required component tokens are conjunctive, and the Nat limit
69# counts accepted rows before component rendering. Resources are rendered apart
70# from entity filters, including when the entity limit is zero.
71# All projections return their actual storage/resource owners. This does not run
72# systems, advance readers, flush commands or apply a structural barrier. Opaque
73# presenter behavior remains trusted rather than universally proven noninterfering.
74# See docs/parity/debug.md, ordinary filtered dump acceptance and retained consumer.
75def snapshot(~S:Data,~C:Type,~R:Type,~E:Data,~H:Type,~Rows:Data,~observe:W.World<S,C,R,E> -> W.World<S,C,R,E> & DTO.Observation<Rows>,~fold:H -> H & List<&2,Records.Fields<S>>,~count:C -> List<&2,W.Handle<S>> -> C & List<&2,Maybe<&2,U32>>,~components:C -> U32 -> C & List<&2,Maybe<&2,String>>,~resources:R -> R & List<&2,Maybe<&2,String>>,criteria:Filter.Filter<S>,value:Application<S,C,R,E,H,Rows,observe,fold,count,components,resources>) -> Application<S,C,R,E,H,Rows,observe,fold,count,components,resources> & Maybe<&2,Dump<S>>:
76  match value:
77    case Application{schema,Build.Registered{world,owners,recipe,False{}}}:(Application{schema,Build.Registered{world,owners,recipe,False{}}},None{})
78    case Application{schema,Build.Registered{world,owners,recipe,True{}}}:scanned(~S,~C,~R,~E,~H,~Rows,~observe,~fold,~count,~components,~resources,schema,owners,recipe,criteria,W.handles(~S,~C,~R,~E,world))

Uses (17)

Used by (1)