Interface HookResult<E extends HookEvent>

All Known Implementing Classes:
HookResult.Allow, HookResult.Block, HookResult.Modify

public sealed interface HookResult<E extends HookEvent> permits HookResult.Allow<E>, HookResult.Block<E>, HookResult.Modify<E>
Decision returned by a Hook after observing an event (issue #58). Sealed so the dispatcher can pattern-match exhaustively.
  • HookResult.Allow — pass through; chain continues.
  • HookResult.Block — refuse the operation; chain stops, the caller receives a structured deny with reason + severity.
  • HookResult.Modify — replace the event for the rest of the chain (and ultimately the operation the event represents). Useful for redaction, argument rewriting, or routing decisions.
Since:
0.5.0 (issue #58)