def create

bendvy-ecs-core@0.1.0.3 · world.bend:123

import bendvy-ecs-core@0.1.0.3/world.bend as World
import Base

123# Consume the raw Factory and resource owner to construct an empty World, advancing
124# the namespace sequence on success. Namespace exhaustion returns both inputs via
125# CreateRejected. Trusted empty supplies C; use world-io for application creation.
126def create(~S:Data,~C:Type,~R:Type,~E:Data,~empty:Unit -> C,factory:Factory,resource:R) -> Creation<S,C,R,E>:
127  match factory:
128    case Factory{+namespace}:create_checked(~S,~C,~R,~E,~empty,U32.is_lt(namespace,4294967295),namespace,resource)

Uses (5)

Used by (2)