def provide

bendvy-ecs-core@0.1.0.4 · ordinary_lifetime_scope.bend:95

import bendvy-ecs-core@0.1.0.4/ordinary_lifetime_scope.bend as OrdinaryLifetimeScope
import Base
import bendvy-ecs-core@0.1.0.4/lifetime_scope.bend as Sc
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/relation_commands.bend as A
import bendvy-ecs-core@0.1.0.4/relation_failure_reader.bend as Rel
import bendvy-ecs-core@0.1.0.4/capabilities.bend as Cap
import bendvy-ecs-core@0.1.0.4/transaction.bend as T

95# Trusted system-construction adapter for the canonical transaction owner.
96# Supplies spawn/cleanup operations using the closed populate, clear, record and
97# relation declarations. populate receives the full World at deferred application;
98# clear must match its Clear declaration, and relation declarations must cover the
99# links cleanup is expected to maintain. These callbacks are schema/engine setup,
100# not extra runtime authority exposed to the polymorphic gameplay body.
101def provide(~S:Data,~C:Type,~R:Type,~E:Data,~P:Type,~populate:W.World<S,A.Store<S,Sc.Store<S,C>>,R,A.Notice<S,E>> -> W.Handle<S> -> P -> W.World<S,A.Store<S,Sc.Store<S,C>>,R,A.Notice<S,E>>,~clear:C -> W.Handle<S> -> C & List<&2,A.Notice<S,E>>,~record:W.Handle<S> -> A.Notice<S,E>,~declarations:List<&2,Rel.Declaration<S>>) -> Ops<T.Tx<W.World<S,A.Store<S,Sc.Store<S,C>>,R,A.Notice<S,E>>,A.Notice<S,E>>,S,P>:
102  Ops{Cap.OwnedRequest{spawn_request(~S,~C,~R,~E,~P,~populate)},Cap.Request{cleanup_request(~S,~C,~R,~E,~clear,~record,~declarations)}}

Uses (14)

Used by (1)