def component_binding
import bendvy-ecs-core@0.1.0.4/ordinary_lifetime_scope.bend as OrdinaryLifetimeScopeimport Base
import bendvy-ecs-core@0.1.0.4/lifetime_scope.bend as Sc
import bendvy-ecs-core@0.1.0.4/relation_commands.bend as A
import bendvy-ecs-core@0.1.0.4/column.bend as Col
import bendvy-ecs-core@0.1.0.4/ordinary_component_binding.bend as Binding
158# Derive a component binding for the wrapped Store from its original binding.
159# Retains the schema identity, view and typed column path while adding scope and
160# relation owners to the remainder. This adapts schema setup; it grants no new
161# access merely from a component name. See fixture.bend:scoped_binding in the
162# public-scopes/feature-timing-v1 consumer.
163def component_binding(~S:Data,~C:Type,~Rest:Type,~P:Type,~V:Data,~Token:Data,~take:C -> Rest & Col.Column<S,P>,~put:Rest -> Col.Column<S,P> -> C,~view:P -> P & V,binding:Binding.Binding<S,C,Rest,P,V,Token,take,put,view>) -> Binding.Binding<S,A.Store<S,Sc.Store<S,C>>,ComponentRest<S,Rest>,P,V,Token,take_column(~S,~C,~Rest,~P,~take),put_column(~S,~C,~Rest,~P,~put),view>:
164 Binding.bind(~S,~A.Store<S,Sc.Store<S,C>>,~ComponentRest<S,Rest>,~P,~V,~Token,~take_column(~S,~C,~Rest,~P,~take),~put_column(~S,~C,~Rest,~P,~put),~view,Binding.identity(~S,~C,~Rest,~P,~V,~Token,~take,~put,~view,binding))
Uses (10)
Used by (0)
No other definition uses this definition.