Cancel Mode
Determines how a Bus should interpret cancellation when dispatching events that implement Cancelable.
A cancel mode is supplied to Bus.post to control whether event cancellation:
is ignored entirely,
is respected on a per-handler basis, or
should terminate dispatch immediately.
The mode applies only to event-handler invocation; exception-handler dispatch is unaffected.
Summary of Modes
| Mode | Handler Runs When Event Is Canceled? | Stops Pipeline? |
|---|---|---|
| IGNORE | Yes, all handlers always run | Never |
| RESPECT | Only handlers that explicitly opt-in to receiving canceled events | Never |
| ENFORCE | No; dispatch halts immediately on first cancellation | Yes |
This design allows the caller to choose between:
simple "fire every handler" behavior,
fine-grained handler-level control over canceled events, and
strict short-circuit semantics in which cancellation acts as a hard stop.
Entries
Properties
Functions
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
Returns an array containing the constants of this enum type, in the order they're declared.