def register_checked

bendvy-ecs-core@0.1.0.4 · world.bend:287

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

287def register_checked(~S: Data,~C: Type,~R: Type,~E: Data,available: Bool,world: World<S,C,R,E>,+name: String,+access: List<&2,String>) -> World<S,C,R,E> & Registration:
288  match available world:
289    case False{} world: (world,RegistrationRejected{SystemIdExhausted{}})
290    case True{} World{+namespace,allocator,store,resource,+events,pending,+registrations,+nextSystemId,+clock}: (World{namespace,allocator,store,resource,events,pending,RegistrationMeta{nextSystemId,name,access} <> registrations,(nextSystemId + 1 : U32),clock},Registered{nextSystemId})

Uses (11)

Used by (1)