def snapshot_checked

bendvy-ecs-core@0.1.0.3 · execution_lifetime_scope_store.bend:39

import bendvy-ecs-core@0.1.0.3/execution_lifetime_scope_store.bend as ExecutionLifetimeScopeStore
import Base
import bendvy-ecs-core@0.1.0.3/lifetime_scope.bend as Scope

39def snapshot_checked(~S:Data,allowed:Bool,store:Store<S>,scope:Scope.Scope<S>) -> Store<S> & Snapshot<S>:
40  match allowed store scope:
41    case False{} store scope:(store,SnapshotRefused{scope})
42    case True{} Store{namespace,+members} Scope.Scope{+scopeNamespace,+name}:(Store{namespace,members},Selected{Scope.Scope{scopeNamespace,name},Scope.select(members,name)})

Uses (7)

Used by (1)