ExecutionSaveRecipe.projected: def of bendvy-ecs-core@0.1.0.3
Import: import bendvy-ecs-core@0.1.0.3/execution_save_recipe.bend as ExecutionSaveRecipe
Lines 29-32 of bendvy-ecs-core@0.1.0.3/execution_save_recipe.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.3/execution_save_recipe.bend&start_line=29&end_line=32
import Base
import bendvy-ecs-core@0.1.0.3/ordinary_declaration.bend as C
import bendvy-ecs-core@0.1.0.3/persistence_declaration.bend as Decl
import bendvy-ecs-core@0.1.0.3/decode_data.bend as D
def projected(~S:Data,~P:Type,~identity:C.Declaration,~project:P -> P & D.Raw,declaration:Decl.Constructed,result:D.Receipt
) -> Leaf & (P & Field):
match result:
case D.Receipt{owner,D.Accepted{value}}:(Constructed{declaration},(owner,Saved{D.Field{C.key(~S,~P,identity),value}}))
case D.Receipt{owner,D.Rejected{error}}:(Constructed{declaration},(owner,Refused{InvalidProjection{C.key(~S,~P,identity),error}}))
Uses (12):
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma
https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/decode_data.bend&name=Checked
https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/decode_data.bend&name=Field
https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/decode_data.bend&name=Raw
https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/decode_data.bend&name=Receipt
https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/execution_save_recipe.bend&name=Field
https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/execution_save_recipe.bend&name=Leaf
https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/execution_save_recipe.bend&name=Refusal
https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/ordinary_declaration.bend&name=Declaration
https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/ordinary_declaration.bend&name=key
https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/persistence_declaration.bend&name=Constructed