def publishing

bendvy-ecs-core@0.1.0.4 · ordinary_event_declaration.bend:46

import bendvy-ecs-core@0.1.0.4/ordinary_event_declaration.bend as OrdinaryEventDeclaration
import Base
import bendvy-ecs-core@0.1.0.4/event_runtime.bend as Ev

46# Select a typed publication grant: Some only for Write, None for Read.
47# publish is a trusted owner-threading operation; the declaration does not
48# make arbitrary callback effects transactional or execute publication here.
49def publishing(~S:Data,~E:Data,~H:Type,~publish:H -> E -> H,declaration:Declaration<S,E>) -> Maybe<&2,Ev.WriteAccess<H,E,publish>>:
50  match declaration:
51    case Declaration{_,Write{}}:Some{Ev.WriteAccess{}}
52    case Declaration{_,Read{}}:None{}

Uses (4)

Used by (0)

No other definition uses this definition.