def action

bendvy-ecs-core@0.1.0.4 · owned_event_journal.bend:18

import bendvy-ecs-core@0.1.0.4/owned_event_journal.bend as OwnedEventJournal
import Base
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/owner_product.bend as Product
import bendvy-ecs-core@0.1.0.4/owned_event_log.bend as Log
import bendvy-ecs-core@0.1.0.4/owned_event_family_storage.bend as Storage

18def action(~S:Data,~C:Type,~R:Type,~P:Type,~Rest:Type,~E:Data,~path:Product.Lens<R,Log.Log<P>,Rest>,~inject:Nat -> E,~All:Type,~RecoveryRest:Type,~recovery:Product.Lens<All,List<P>,RecoveryRest>,payload:P,success:Bool,world:W.World<S,C,R,E>,all:All) -> W.World<S,C,R,E> & All:
19  match success:
20    case True{}:(Storage.commit_owned(~S,~C,~R,~P,~Rest,~E,~path,~inject,world,[payload]),all)
21    case False{}:(world,recover(~P,~All,~RecoveryRest,~recovery,payload,all))

Uses (10)

Used by (1)