~/bend-docscommunity

ordinary_schema_provision.bend checks

raw source on the hub · import bendvy-ecs-core@0.1.0.2/ordinary_schema_provision.bend as Ordinary_schema_provision

9 imports
import Base
import entity_key.bend as Key
import ./persistence_declaration.bend as Persist
import ./decode_data.bend as D
import ./world.bend as W
import ./column.bend as Col
import ./ordinary_schema.bend as Schema
import ./ordinary_declaration.bend as Identity
import ./owner_product.bend as Product

Types

type Provision source · line 15 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-empty:(@_:Unit -> C) -> @-count:(@_:C -> @_:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S>> -> Pair(C, List<&2, Maybe<&2, U32>>)) -> Data

The single ordinary Schema owns all keys. The erased traversal holds no keys, presenters or payloads. Ordinary builders generate matching leaf slots/order. Trusted ordinary schema setup indexed by matching storage construction and population counting. Contains one schema, not live World/resource owners. Raw construction must preserve entry/slot order; no lens laws are checked.

Definitions

def resource_empty source · line 32 · raw

@unit:Unit -> Unit

Templates

template counted source · line 17 · raw

@-S:Data -> @-P:Type -> @total:U32 -> @result:Pair(0xb2b0f04555daca474f0f77d0966945c9/column.Column<S, P>, Bool) -> @ih:(@_:0xb2b0f04555daca474f0f77d0966945c9/column.Column<S, P> -> @_:U32 -> Pair(0xb2b0f04555daca474f0f77d0966945c9/column.Column<S, P>, U32)) -> Pair(0xb2b0f04555daca474f0f77d0966945c9/column.Column<S, P>, U32)

template column_count source · line 21 · raw

@-S:Data -> @-P:Type -> @handles:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S>> -> @column:0xb2b0f04555daca474f0f77d0966945c9/column.Column<S, P> -> @total:U32 -> Pair(0xb2b0f04555daca474f0f77d0966945c9/column.Column<S, P>, U32)

template component_counted source · line 25 · raw

@-S:Data -> @-P:Type -> @result:Pair(0xb2b0f04555daca474f0f77d0966945c9/column.Column<S, P>, U32) -> Pair(0xb2b0f04555daca474f0f77d0966945c9/column.Column<S, P>, List<&2, Maybe<&2, U32>>)

template component_count source · line 28 · raw

@-S:Data -> @-P:Type -> @column:0xb2b0f04555daca474f0f77d0966945c9/column.Column<S, P> -> @handles:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S>> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/column.Column<S, P>, List<&2, Maybe<&2, U32>>)

template component_empty source · line 30 · raw

@-S:Data -> @-P:Type -> @unit:Unit -> 0xb2b0f04555daca474f0f77d0966945c9/column.Column<S, P>

template resource_count source · line 31 · raw

@-S:Data -> @value:Unit -> @handles:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S>> -> Pair(Unit, List<&2, Maybe<&2, U32>>)

template component source · line 36 · raw

@-S:Data -> @-P:Type -> @declaration:0xb2b0f04555daca474f0f77d0966945c9/ordinary_declaration.Declaration<S, P> -> Provision<S, 0xb2b0f04555daca474f0f77d0966945c9/column.Column<S, P>, Unit, component_empty(S, P), component_count(S, P)>

Declare a component with matching empty-column/counting operations. Does not allocate a World or consume a component payload; combines with product for heterogeneous affine schema storage.

template resource source · line 40 · raw

@-S:Data -> @-P:Type -> @declaration:0xb2b0f04555daca474f0f77d0966945c9/ordinary_schema.Resource<S, P> -> Provision<S, Unit, P, resource_empty, resource_count(S)>

Declare a resource schema leaf. Its component-storage contribution is Unit and population slot is None; the caller supplies actual R on creation.

template product_counted source · line 42 · raw

@-L:Type -> @-R:Type -> @left:L -> @before:List<&2, Maybe<&2, U32>> -> @right:Pair(R, List<&2, Maybe<&2, U32>>) -> Pair(0xb2b0f04555daca474f0f77d0966945c9/owner_product.Owner<L, R>, List<&2, Maybe<&2, U32>>)

template product_left source · line 45 · raw

@-S:Data -> @-L:Type -> @-R:Type -> @-rightCount:(@_:R -> @_:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S>> -> Pair(R, List<&2, Maybe<&2, U32>>)) -> @right:R -> @handles:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S>> -> @left:Pair(L, List<&2, Maybe<&2, U32>>) -> Pair(0xb2b0f04555daca474f0f77d0966945c9/owner_product.Owner<L, R>, List<&2, Maybe<&2, U32>>)

template product_count source · line 48 · raw

@-S:Data -> @-L:Type -> @-R:Type -> @-leftCount:(@_:L -> @_:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S>> -> Pair(L, List<&2, Maybe<&2, U32>>)) -> @-rightCount:(@_:R -> @_:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S>> -> Pair(R, List<&2, Maybe<&2, U32>>)) -> @store:0xb2b0f04555daca474f0f77d0966945c9/owner_product.Owner<L, R> -> @handles:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S>> -> Pair(0xb2b0f04555daca474f0f77d0966945c9/owner_product.Owner<L, R>, List<&2, Maybe<&2, U32>>)

template product_empty source · line 53 · raw

@-L:Type -> @-R:Type -> @-leftEmpty:(@_:Unit -> L) -> @-rightEmpty:(@_:Unit -> R) -> @unit:Unit -> 0xb2b0f04555daca474f0f77d0966945c9/owner_product.Owner<L, R>

template product source · line 58 · raw

@-S:Data -> @-LC:Type -> @-LR:Type -> @-RC:Type -> @-RR:Type -> @-leftEmpty:(@_:Unit -> LC) -> @-leftCount:(@_:LC -> @_:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S>> -> Pair(LC, List<&2, Maybe<&2, U32>>)) -> @-rightEmpty:(@_:Unit -> RC) -> @-rightCount:(@_:RC -> @_:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S>> -> Pair(RC, List<&2, Maybe<&2, U32>>)) -> @left:Provision<S, LC, LR, leftEmpty, leftCount> -> @right:Provision<S, RC, RR, rightEmpty, rightCount> -> Provision<S, 0xb2b0f04555daca474f0f77d0966945c9/owner_product.Owner<LC, RC>, 0xb2b0f04555daca474f0f77d0966945c9/owner_product.Owner<LR, RR>, product_empty(LC, RC, leftEmpty, rightEmpty), product_count(S, LC, RC, leftCount, rightCount)>

Compose trusted provisions in left/right schema/storage/count-slot order. Payload types may be affine; this setup value contains no live payloads. Does not validate duplicate keys or build a World.

template create source · line 65 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-empty:(@_:Unit -> C) -> @-count:(@_:C -> @_:List<&2, 0xb2b0f04555daca474f0f77d0966945c9/world.Handle<S>> -> Pair(C, List<&2, Maybe<&2, U32>>)) -> @provision:Provision<S, C, R, empty, count> -> @factory:0xb2b0f04555daca474f0f77d0966945c9/world.Factory -> @resource:R -> Pair(Provision<S, C, R, empty, count>, 0xb2b0f04555daca474f0f77d0966945c9/world.Creation<S, C, R, E>)

Trusted factory-based World creation returning provision and Creation. Refusal preserves caller resources through the Creation result. This uses the supplied pure Factory and does not allocate a process-unique namespace; prefer checked IO creation for independently created ordinary Worlds.

template component_plain source · line 71 · raw

@-S:Data -> @-P:Type -> @-identity:0xb2b0f04555daca474f0f77d0966945c9/ordinary_declaration.Declaration<S, P> -> @extension:0xb2b0f04555daca474f0f77d0966945c9/persistence_declaration.Plain<S, P, identity> -> Provision<S, 0xb2b0f04555daca474f0f77d0966945c9/column.Column<S, P>, Unit, component_empty(S, P), component_count(S, P)>

Declare a component provision with plain persistence classification from its identity-bound extension. Derives matching empty/count operations; does not execute codecs, validate saved input or construct payload values.

template component_transient source · line 76 · raw

@-S:Data -> @-P:Type -> @-identity:0xb2b0f04555daca474f0f77d0966945c9/ordinary_declaration.Declaration<S, P> -> @extension:0xb2b0f04555daca474f0f77d0966945c9/persistence_declaration.Transient<S, P, identity> -> Provision<S, 0xb2b0f04555daca474f0f77d0966945c9/column.Column<S, P>, Unit, component_empty(S, P), component_count(S, P)>

Declare a component provision with transient persistence classification from its identity-bound extension. Derives matching empty/count operations; does not execute codecs, validate saved input or construct payload values.

template component_constructed source · line 81 · raw

@-S:Data -> @-P:Type -> @-identity:0xb2b0f04555daca474f0f77d0966945c9/ordinary_declaration.Declaration<S, P> -> @-project:(@_:P -> Pair(P, 0xb2b0f04555daca474f0f77d0966945c9/decode_data.Raw)) -> @extension:0xb2b0f04555daca474f0f77d0966945c9/persistence_declaration.Constructed<S, P, identity, project> -> Provision<S, 0xb2b0f04555daca474f0f77d0966945c9/column.Column<S, P>, Unit, component_empty(S, P), component_count(S, P)>

Declare a component provision with constructed persistence classification from its identity-bound extension. Derives matching empty/count operations; does not execute codecs, validate saved input or construct payload values.

template resource_plain source · line 86 · raw

@-S:Data -> @-P:Type -> @-identity:0xb2b0f04555daca474f0f77d0966945c9/ordinary_declaration.Declaration<S, P> -> @extension:0xb2b0f04555daca474f0f77d0966945c9/persistence_declaration.Plain<S, P, identity> -> Provision<S, Unit, P, resource_empty, resource_count(S)>

Declare a resource provision with plain persistence classification from its identity-bound extension. Derives matching empty/count operations; does not execute codecs, validate saved input or construct payload values.

template resource_transient source · line 91 · raw

@-S:Data -> @-P:Type -> @-identity:0xb2b0f04555daca474f0f77d0966945c9/ordinary_declaration.Declaration<S, P> -> @extension:0xb2b0f04555daca474f0f77d0966945c9/persistence_declaration.Transient<S, P, identity> -> Provision<S, Unit, P, resource_empty, resource_count(S)>

Declare a resource provision with transient persistence classification from its identity-bound extension. Derives matching empty/count operations; does not execute codecs, validate saved input or construct payload values.

template resource_constructed source · line 96 · raw

@-S:Data -> @-P:Type -> @-identity:0xb2b0f04555daca474f0f77d0966945c9/ordinary_declaration.Declaration<S, P> -> @-project:(@_:P -> Pair(P, 0xb2b0f04555daca474f0f77d0966945c9/decode_data.Raw)) -> @extension:0xb2b0f04555daca474f0f77d0966945c9/persistence_declaration.Constructed<S, P, identity, project> -> Provision<S, Unit, P, resource_empty, resource_count(S)>

Declare a resource provision with constructed persistence classification from its identity-bound extension. Derives matching empty/count operations; does not execute codecs, validate saved input or construct payload values.