~/bend-docscommunity

ordinary_app_resource_declaration.bend checks

raw source on the hub · import bendvy-ecs-core@0.1.0.7/ordinary_app_resource_declaration.bend as Ordinary_app_resource_declaration

7 imports
import Base
import ./ordinary_resource_system.bend as P
import ./ordinary_schema.bend as Schema
import ./world.bend as W
import ./transaction.bend as T
import ./capabilities.bend as Cap
import ./ordinary_query_declaration.bend as Query

Types

type Declaration source · line 16 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Ops:(@_:Type -> Type) -> @-V:Data -> Type

One static declaration constructs operational and owner-preserving observation routes. It carries no runtime-owned World or resource payload. App declaration for the entire Resources owner R in one schema S. Keeps operational permissions, an owner-threading Data observation and its renderer together. It contains no live World or resource instance. Choose ordinary-app-resource-field-declaration when only one product field is needed. Concrete setup: test-fixtures/public-schedules/named-app-v1/ matched-feature-v1/fixture.bend:declaration and reader_declaration.

Templates

template read_ops source · line 20 · raw

@-V:Data -> @H:Type -> Type

Operation-family alias for whole-resource read access to a Data view V. The callback receives an opaque owner H; the grant cannot replace Resources.

template write_ops source · line 25 · raw

@-R:Type -> @-V:Data -> @H:Type -> Type

Operation-family alias for whole-resource read/replacement access. A write consumes a replacement R, which may contain affine Type payloads; this is not the narrower grant for replacing a single resource field.

template read source · line 32 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-V:Data -> @-project:(@_:R -> Pair(R, V)) -> @-render:(@_:V -> String) -> @identity:0x7e321819d0ff210531780719c7674cef/ordinary_schema.Resource<S, R> -> Declaration<S, C, R, E, read_ops(V), V>

Declare read access using a schema-bound resource identity and projection. project threads R back with a Data view V; render formats that view for App observation. The returned declaration is setup data, not a live resource read. The observation path also threads the World; it does not imply that an arbitrary user projector is pure or can be undone automatically.

template write source · line 39 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-V:Data -> @-project:(@_:R -> Pair(R, V)) -> @-render:(@_:V -> String) -> @identity:0x7e321819d0ff210531780719c7674cef/ordinary_schema.Resource<S, R> -> Declaration<S, C, R, E, write_ops(R, V), V>

Declare read and whole-owner replacement access to schema resource R. Uses the same projection/rendering contract as read. Replacements made through the operational grant use the ordinary transaction journal: a failed system restores the old resource. This declaration does not execute a system or grant rollback for arbitrary host IO or effects outside those operations.

template ordinary source · line 44 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Ops:(@_:Type -> Type) -> @-V:Data -> @declaration:Declaration<S, C, R, E, Ops, V> -> 0x7e321819d0ff210531780719c7674cef/ordinary_resource_system.Declaration<S, R, 0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E>, Ops(0x7e321819d0ff210531780719c7674cef/transaction.Tx<0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, E>)>

Advanced App projection: consume the declaration and return its operational resource declaration. Recreate a closed declaration when multiple projections are needed; metadata strings alone cannot substitute for the typed grant.

template observer source · line 50 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Ops:(@_:Type -> Type) -> @-V:Data -> @declaration:Declaration<S, C, R, E, Ops, V> -> @_:0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E> -> Pair(0x7e321819d0ff210531780719c7674cef/world.World<S, C, R, E>, V)

Advanced App projection: consume the declaration and obtain the function World -> (World, V). The World owner is returned after the resource projection; this observer neither registers nor executes the resource system.

template presenter source · line 55 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Ops:(@_:Type -> Type) -> @-V:Data -> @declaration:Declaration<S, C, R, E, Ops, V> -> @_:V -> String

Obtain the declared Data-view renderer, consuming this declaration value. Rendering is observation work and grants no access to a World or resource.

template named source · line 58 · raw

@-S:Data -> @value:0x7e321819d0ff210531780719c7674cef/ordinary_query_declaration.Clause<S> -> String

template name source · line 64 · raw

@-S:Data -> @-C:Type -> @-R:Type -> @-E:Data -> @-Ops:(@_:Type -> Type) -> @-V:Data -> @declaration:Declaration<S, C, R, E, Ops, V> -> String

Return the resource access key from this declaration's operational clause. Consumes the declaration and retains its declared name, not runtime authority. Use the schema identity for access, rather than reconstructing it from this text.