def get

bendvy-ecs-core@0.1.0.3 · component.bend:90

import bendvy-ecs-core@0.1.0.3/component.bend as Component
import Base
import column.bend as Col
import world.bend as W

90# Read a detached view while returning World and the actual projected payload to
91# its column. Validate namespace, generation and live state before column access;
92# invalid/stale/foreign handles yield MissingEntity, not ComponentAbsent.
93# See examples/health-decay/schema.bend for family provisioning.
94def get(~S: Data,~Store: Type,~R: Type,~E: Data,~Rest: Type,~C: Type,~V: Data,~Token: Data,~take: Store -> Rest & Col.Column<S,C>,~put: Rest -> Col.Column<S,C> -> Store,~project: C -> C & V,family: Family<S,Store,Rest,C,V,Token,take,put,project>,world: W.World<S,Store,R,E>,+handle: W.Handle<S>) -> W.World<S,Store,R,E> & Access<V>:
95  match world handle:
96    case W.World{+namespace,allocator,store,resource,events,pending,registrations,nextSystemId,clock,lifecycle} W.Handle{ns,key}:
97      get_namespace_fields(~S,~Store,~R,~E,~Rest,~C,~V,~Token,~take,~put,~project,U32.is_eq(namespace,ns),key,allocator,namespace,store,resource,events,pending,registrations,nextSystemId,clock,lifecycle)

Uses (8)

Used by (2)