Interfacecorev0.1.0-next.5
Gate
A precondition attached to a handler. It refuses by throwing a NoticeNotice (a reply) or a SilenceSilence (a drop with no reply), and passes by returning. CtxCtx is the context it requires, so a gate that reads a field absent on a handler's context is rejected at compile time. NameName is captured as a literal so a mismatch error can name the gate. Build one with defineGatedefineGate or defineEffectGatedefineEffectGate.
See also:defineGate
interface Gate<
Ctx extends GateContextBase = GateContextBase,
Name extends string = string
>interface Gate<
Ctx extends GateContextBase = GateContextBase,
Name extends string = string
>Ctx
The context the gate requires, so reading a field absent on a handler's context is a compile error.
Ctx extends GateContextBase = GateContextBaseCtx extends GateContextBase = GateContextBaseName
The gate's name captured as a literal, so a mismatch error can name the gate.