def entity_fields

bendvy-ecs-core@0.1.0.4 · restore_raw.bend:45

import bendvy-ecs-core@0.1.0.4/restore_raw.bend as RestoreRaw
import Base
import bendvy-ecs-core@0.1.0.4/decode_data.bend as D
import bendvy-ecs-core@0.1.0.4/entity_key.bend as Key
import bendvy-ecs-core@0.1.0.4/snapshot_data.bend as Snapshot

45def entity_fields(saved:Key.Key,path:String,raw:D.Raw) -> Decoded<Snapshot.Entity>:
46  match raw:
47    case D.Object{fields}:Value{Snapshot.Entity{saved,fields}}
48    case other:invalid(~Snapshot.Entity,path,"object",other)

Uses (6)

Used by (1)