def reading
import bendvy-ecs-core@0.1.0.4/ordinary_event_declaration.bend as OrdinaryEventDeclarationimport Base
import bendvy-ecs-core@0.1.0.4/event_runtime.bend as Ev
39# Select a typed read grant: Some only for Read, None for Write.
40# observe is trusted owner-threading setup; constructing a grant invokes no
41# reader and does not advance a cursor or inspect a stream.
42def reading(~S:Data,~E:Data,~H:Type,~observe:H -> H & Ev.Reading<E>,declaration:Declaration<S,E>) -> Maybe<&2,Ev.ReadAccess<H,E,observe>>:
43 match declaration:
44 case Declaration{_,Read{}}:Some{Ev.ReadAccess{}}
45 case Declaration{_,Write{}}:None{}
Uses (6)
Used by (0)
No other definition uses this definition.