def view

bendvy-ecs-core@0.1.0.4 · inspector_failure_projection.bend:35

import bendvy-ecs-core@0.1.0.4/inspector_failure_projection.bend as InspectorFailureProjection
import Base
import bendvy-ecs-core@0.1.0.4/event_runtime.bend as Ev
import bendvy-ecs-core@0.1.0.4/relation_commands.bend as A
import bendvy-ecs-core@0.1.0.4/relation_types.bend as G

35# Project visible and retained failures separately from a detached snapshot.
36# Preserve its tick and retention boundary; this does not acknowledge a reader.
37def view(~S:Data,~E:Data,+relation:G.Descriptor<S>,snapshot:Ev.Snapshot<A.Notice<S,E>>) -> FailureView<S,E>:
38  match snapshot:
39    case Ev.Snapshot{visible,retained,_,tick,boundary}:FailureView{relation,failures(~S,~E,relation,visible),failures(~S,~E,relation,retained),tick,boundary}

Uses (5)

Used by (1)