~/bend-docscommunity

resource_field.bend checks

raw source on the hub · import bendvy-ecs-core@0.1.0.0/resource_field.bend as Resource_field

8 imports
import Base
import ./deferred_command.bend as Deferred
import ./trace_facts.bend as TraceFacts
import ./owner_product.bend as Product
import ./world.bend as W
import ./transaction.bend as T
import ./resource.bend as Resource
import ./capabilities.bend as Cap

Templates

template viewed source · line 10 · raw

@-R:Type -> @-P:Type -> @-Rest:Type -> @-V:Data -> @-lens:0x296ca5f551e3792cd56cfc8122905b94/owner_product.Lens<R, P, Rest> -> @rest:Rest -> @result:Pair(P, V) -> Pair(R, V)

Canonical product lenses preserve affine siblings during selected-field operations.

template taken source · line 13 · raw

@-R:Type -> @-P:Type -> @-Rest:Type -> @-V:Data -> @-lens:0x296ca5f551e3792cd56cfc8122905b94/owner_product.Lens<R, P, Rest> -> @-view:(@_:P -> Pair(P, V)) -> @result:Pair(Rest, P) -> Pair(R, V)

template project source · line 16 · raw

@-R:Type -> @-P:Type -> @-Rest:Type -> @-V:Data -> @-lens:0x296ca5f551e3792cd56cfc8122905b94/owner_product.Lens<R, P, Rest> -> @-view:(@_:P -> Pair(P, V)) -> @resource:R -> Pair(R, V)

template replacing source · line 18 · raw

@-R:Type -> @-P:Type -> @-Rest:Type -> @-lens:0x296ca5f551e3792cd56cfc8122905b94/owner_product.Lens<R, P, Rest> -> @replacement:P -> @result:Pair(Rest, P) -> Pair(R, P)

template replace source · line 21 · raw

@-R:Type -> @-P:Type -> @-Rest:Type -> @-lens:0x296ca5f551e3792cd56cfc8122905b94/owner_product.Lens<R, P, Rest> -> @replacement:P -> @resource:R -> Pair(R, P)

template replace_world source · line 25 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @-Rest:Type -> @-lens:0x296ca5f551e3792cd56cfc8122905b94/owner_product.Lens<R, P, Rest> -> @replacement:P -> @world:0x296ca5f551e3792cd56cfc8122905b94/world.World<S, C, R, E> -> Pair(0x296ca5f551e3792cd56cfc8122905b94/world.World<S, C, R, E>, P)

Runtime replacement owners cannot be captured in an erased projector template. Trusted engine boundary threads the same World fields through the core join.

template restored source · line 28 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @result:Pair(0x296ca5f551e3792cd56cfc8122905b94/world.World<S, C, R, E>, P) -> 0x296ca5f551e3792cd56cfc8122905b94/world.World<S, C, R, E>

template restore source · line 31 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @-Rest:Type -> @-lens:0x296ca5f551e3792cd56cfc8122905b94/owner_product.Lens<R, P, Rest> -> @old:P -> @world:0x296ca5f551e3792cd56cfc8122905b94/world.World<S, C, R, E> -> 0x296ca5f551e3792cd56cfc8122905b94/world.World<S, C, R, E>

template journaled source · line 33 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @-Rest:Type -> @-lens:0x296ca5f551e3792cd56cfc8122905b94/owner_product.Lens<R, P, Rest> -> @undo:List<&1, @_:0x296ca5f551e3792cd56cfc8122905b94/world.World<S, C, R, E> -> 0x296ca5f551e3792cd56cfc8122905b94/world.World<S, C, R, E>> -> @commands:List<&1, 0x296ca5f551e3792cd56cfc8122905b94/deferred_command.Command<0x296ca5f551e3792cd56cfc8122905b94/world.World<S, C, R, E>>> -> @events:List<&2, E> -> @trace:0x296ca5f551e3792cd56cfc8122905b94/trace_facts.State -> @result:Pair(0x296ca5f551e3792cd56cfc8122905b94/world.World<S, C, R, E>, P) -> 0x296ca5f551e3792cd56cfc8122905b94/transaction.Tx<0x296ca5f551e3792cd56cfc8122905b94/world.World<S, C, R, E>, E>

template tx_set source · line 36 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @-Rest:Type -> @-lens:0x296ca5f551e3792cd56cfc8122905b94/owner_product.Lens<R, P, Rest> -> @tx:0x296ca5f551e3792cd56cfc8122905b94/transaction.Tx<0x296ca5f551e3792cd56cfc8122905b94/world.World<S, C, R, E>, E> -> @replacement:P -> 0x296ca5f551e3792cd56cfc8122905b94/transaction.Tx<0x296ca5f551e3792cd56cfc8122905b94/world.World<S, C, R, E>, E>

template read source · line 39 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @-Rest:Type -> @-V:Data -> @-lens:0x296ca5f551e3792cd56cfc8122905b94/owner_product.Lens<R, P, Rest> -> @-view:(@_:P -> Pair(P, V)) -> 0x296ca5f551e3792cd56cfc8122905b94/capabilities.ValueRead<0x296ca5f551e3792cd56cfc8122905b94/transaction.Tx<0x296ca5f551e3792cd56cfc8122905b94/world.World<S, C, R, E>, E>, V>

template write source · line 41 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @-Rest:Type -> @-V:Data -> @-lens:0x296ca5f551e3792cd56cfc8122905b94/owner_product.Lens<R, P, Rest> -> @-view:(@_:P -> Pair(P, V)) -> 0x296ca5f551e3792cd56cfc8122905b94/capabilities.ValueWrite<0x296ca5f551e3792cd56cfc8122905b94/transaction.Tx<0x296ca5f551e3792cd56cfc8122905b94/world.World<S, C, R, E>, E>, P, V>

template observed_set_ready source · line 45 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @-Rest:Type -> @-V:Data -> @-lens:0x296ca5f551e3792cd56cfc8122905b94/owner_product.Lens<R, P, Rest> -> @-view:(@_:P -> Pair(P, V)) -> @-render:(@_:V -> String) -> @key:String -> @result:Pair(0x296ca5f551e3792cd56cfc8122905b94/transaction.Tx<0x296ca5f551e3792cd56cfc8122905b94/world.World<S, C, R, E>, E>, V) -> @incoming:Pair(P, V) -> 0x296ca5f551e3792cd56cfc8122905b94/transaction.Tx<0x296ca5f551e3792cd56cfc8122905b94/world.World<S, C, R, E>, E>

The disabled arm reaches the original setter before any view or rendering.

template observed_set_enabled source · line 48 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @-Rest:Type -> @-V:Data -> @-lens:0x296ca5f551e3792cd56cfc8122905b94/owner_product.Lens<R, P, Rest> -> @-view:(@_:P -> Pair(P, V)) -> @-render:(@_:V -> String) -> @key:String -> @replacement:P -> @result:Pair(0x296ca5f551e3792cd56cfc8122905b94/transaction.Tx<0x296ca5f551e3792cd56cfc8122905b94/world.World<S, C, R, E>, E>, Bool) -> 0x296ca5f551e3792cd56cfc8122905b94/transaction.Tx<0x296ca5f551e3792cd56cfc8122905b94/world.World<S, C, R, E>, E>

template observed_set source · line 52 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @-Rest:Type -> @-V:Data -> @-lens:0x296ca5f551e3792cd56cfc8122905b94/owner_product.Lens<R, P, Rest> -> @-view:(@_:P -> Pair(P, V)) -> @-render:(@_:V -> String) -> @-key:String -> @tx:0x296ca5f551e3792cd56cfc8122905b94/transaction.Tx<0x296ca5f551e3792cd56cfc8122905b94/world.World<S, C, R, E>, E> -> @replacement:P -> 0x296ca5f551e3792cd56cfc8122905b94/transaction.Tx<0x296ca5f551e3792cd56cfc8122905b94/world.World<S, C, R, E>, E>

template write_observed source · line 54 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-P:Type -> @-Rest:Type -> @-V:Data -> @-lens:0x296ca5f551e3792cd56cfc8122905b94/owner_product.Lens<R, P, Rest> -> @-view:(@_:P -> Pair(P, V)) -> @-render:(@_:V -> String) -> @-key:String -> 0x296ca5f551e3792cd56cfc8122905b94/capabilities.ValueWrite<0x296ca5f551e3792cd56cfc8122905b94/transaction.Tx<0x296ca5f551e3792cd56cfc8122905b94/world.World<S, C, R, E>, E>, P, V>