def declared

bendvy-ecs-core@0.1.0.4 · inspector_event_value.bend:14

import bendvy-ecs-core@0.1.0.4/inspector_event_value.bend as InspectorEventValue
import Base
import bendvy-ecs-core@0.1.0.4/event_stream.bend as Leaf
import bendvy-ecs-core@0.1.0.4/ordinary_event_declaration.bend as Event

14def declared(~S:Data,~E:Data,declaration:Event.Declaration<S,E>,+stream:Leaf.Stream<S,E>) -> Leaf.Stream<S,E> & Maybe<&2,List<&2,E>>:
15  match declaration stream:
16    case Event.Declaration{_,Event.Write{}} stream:(stream,None{})
17    case Event.Declaration{Event.Domain{expected},Event.Read{}} Leaf.Stream{Event.Domain{+actual},+batches,+positions,+nextReader,+frameStart,+boundary,+capacity,+dropped}:selected(~S,~E,String.eq(expected,actual),Leaf.Stream{Event.Domain{actual},batches,positions,nextReader,frameStart,boundary,capacity,dropped})

Uses (10)

Used by (1)