ordinary_app_event_family_dump.bend

bendvy-ecs-core@0.1.0.1 · 18 lines · 0 definitions

1import Base
2import bendvy-ecs-core@0.1.0.1/ordinary_app_schema.bend as SchemaApp
3import bendvy-ecs-core@0.1.0.1/ordinary_app_composer.bend as Build
4import bendvy-ecs-core@0.1.0.1/event_family_routing.bend as Route
5import bendvy-ecs-core@0.1.0.1/world.bend as W
6import bendvy-ecs-core@0.1.0.1/ordinary_app_event_family_runtime.bend as App
7import bendvy-ecs-core@0.1.0.1/ordinary_app_dump.bend as Dump
8import bendvy-ecs-core@0.1.0.1/ordinary_dump_filter.bend as Filter
9import bendvy-ecs-core@0.1.0.1/ordinary_app_observation_data.bend as DTO
10import bendvy-ecs-core@0.1.0.1/ordinary_app_registration_fields.bend as Records
11# Reuses the schema-derived dump while preserving the actual family/tick/readers.
12# Return the App with an optional filtered schema dump. Disabled debug bypasses
13# dump derivation; enabled uses trusted ordinary count/presentation adapters.
14# Preserve actual family, tick and registration owners without synchronizing or
15# acknowledging event readers; opaque value presentation remains caller supplied.
16def snapshot(~S:Data,~C:Type,~R:Type,~P:Data,~F:Type,~Owners:Type,~Rows:Data,~observe:W.World<S,C,R,P> -> W.World<S,C,R,P> & DTO.Observation<Rows>,~fold:Owners -> Owners & 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:App.Application<S,C,R,P,F,Owners,Rows,observe,fold>) -> App.Application<S,C,R,P,F,Owners,Rows,observe,fold> & Maybe<&2,Dump.Dump<S>>:
17  match value:
18    case App.Application{schema,Route.Runtime{world,family,tick},owners,recipe,debug}:App.returned(~S,~C,~R,~P,~F,~Owners,~Rows,~observe,~fold,~Maybe<&2,Dump.Dump<S>>,family,tick,Dump.schema_snapshot(~S,~C,~R,~P,~Owners,~Rows,~observe,~fold,~count,~components,~resources,criteria,SchemaApp.Application{schema,Build.Registered{world,owners,recipe,debug}}))