def deferred

bendvy-ecs-core@0.1.0.4 · decode_local.bend:46

import bendvy-ecs-core@0.1.0.4/decode_local.bend as DecodeLocal
import Base
import bendvy-ecs-core@0.1.0.4/decode_requests.bend as Request
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/local.bend as Local
import bendvy-ecs-core@0.1.0.4/bundle_batch.bend as Batch

46def deferred(~S:Data,~C:Type,~R:Type,~E:Data,~P:Type,~Error:Data,~L:Type,~Out:Type,~recover:L -> Out -> List<Request.Packet<P>> -> L,local:L,output:Out,result:Batch.Finished<S,C,R,E,Request.Packet<P>,Error>) -> Local.Outcome<W.World<S,C,R,E>,L,Error,Out>:
47  match result:
48    case Batch.Committed{world}:Local.Succeeded{world,local,output}
49    case Batch.Failed{world,packets,error}:Local.Failed{world,recover(local,output,packets),error}

Uses (5)

Used by (1)