def each_rw_read

bendvy-ecs-core@0.1.0.4 · query.bend:83

import bendvy-ecs-core@0.1.0.4/query.bend as Query
import Base
import world.bend as W
import column.bend as Col
import component.bend as Cmp
import transaction.bend as T
import provider.bend as Pv

83# Traverse a snapshot of live handles with required main and selected aux
84# membership, invoking the declared provider body within one transaction.
85# Failure rolls back that traversal's recorded writes/publications; commands
86# remain deferred until an explicit barrier. Families/lenses are trusted setup.
87# Prefer ordinary declarations for application-derived registration/access.
88def each_rw_read(~S: Data,~Store: Type,~R: Type,~E: Data,~Rest: Type,~C: Type,~V: Data,~Token: Data,~take: Store -> Rest & Col.Column<S,C>,~put: Rest -> Col.Column<S,C> -> Store,~project: C -> C & V,~AuxRest: Type,~AuxC: Type,~AuxV: Data,~AuxToken: Data,~aux_take: Store -> AuxRest & Col.Column<S,AuxC>,~aux_put: AuxRest -> Col.Column<S,AuxC> -> Store,~aux_project: AuxC -> AuxC & AuxV,~RV: Data,~resource_project: R -> R & RV,~Payload: Type,~populate: W.World<S,Store,R,E> -> W.Handle<S> -> Payload -> W.World<S,Store,R,E>,~clear: Store -> W.Handle<S> -> Store,~A: Data,~U: Data,~body: @-H: Type -> @-get: (H -> H & Cmp.Access<V>) -> @-set: (H -> C -> H) -> @-aux: (H -> H & Cmp.Access<AuxV>) -> @-resource_get: (H -> H & RV) -> @-resource_set: (H -> R -> H) -> @-emit: (H -> E -> H) -> @-despawn: (H -> H) -> @-spawn: (H -> Payload -> H & W.Reservation<S>) -> A -> W.Handle<S> -> H -> H & T.Outcome<U>,mainFamily: Cmp.Family<S,Store,Rest,C,V,Token,take,put,project>,auxFamily: Cmp.Family<S,Store,AuxRest,AuxC,AuxV,AuxToken,aux_take,aux_put,aux_project>,mode: Selection,world: W.World<S,Store,R,E>,args: A) -> T.Returned<W.World<S,Store,R,E>,Pv.Error<U>>:
89  each_reserved(~S,~Store,~R,~E,~Rest,~C,~V,~Token,~take,~put,~project,~AuxRest,~AuxC,~AuxV,~AuxToken,~aux_take,~aux_put,~aux_project,~RV,~resource_project,~Payload,~populate,~clear,~A,~U,~body,mainFamily,auxFamily,mode,args,W.handles(~S,~Store,~R,~E,world))

Uses (13)

Used by (2)