def bind_declared
import bendvy-ecs-core@0.1.0.3/schema_fragments.bend as SchemaFragmentsimport Base
180# Validate fragment collisions and every explicitly required descriptor
181# before invoking the closed builder. Missing kind/key/name yields
182# BindRejected with the original fragment, without executing build. Trusted
183# builders must still obey their declared requirements; arbitrary callbacks
184# are not runtime-confined by metadata alone.
185def bind_declared(~S: Data,~Owners: Type,~Output: Type,~build: Owners -> Output,fragment: Fragment<S,Owners>,required: List<&2,Entry<S>>) -> Bound<S,Owners,Output>:
186 match fragment:
187 case Fragment{+entries,owners}: bind_requirements(~S,~Owners,~Output,~build,validate(~S,entries),required,Fragment{entries,owners})