def spawned
bendvy-ecs-core@0.1.0.4 · decode_requests.bend:32
import bendvy-ecs-core@0.1.0.4/decode_requests.bend as DecodeRequests
import Base
import bendvy-ecs-core@0.1.0.4/bundle_batch.bend as Batch
import bendvy-ecs-core@0.1.0.4/decode_data.bend as D
import bendvy-ecs-core@0.1.0.4/persistence_declaration.bend as Decl
import bendvy-ecs-core@0.1.0.4/ordinary_declaration.bend as Identity
32def spawned(~S:Data,~C:Type,~R:Type,~E:Data,~P:Type,~identity:Identity.Declaration<S,P>,~project:P -> P & D.Raw,declaration:Decl.Constructed<S,P,identity,project>,canonical:D.Raw,result:Batch.Spawned<S,C,R,E,Packet<P>>) -> Owner<S,C,R,E,P,identity,project> & Output<S,P>:
33 match result:
34 case Batch.Spawned{batch,target}:(Owner{batch,declaration},Accepted{target,True{},canonical})
35 case Batch.SpawnRefused{batch,Packet{owner,_,_},error}:(Owner{batch,declaration},Refused{owner,Entity{error}})