Internal data structure representing a node in the routing tree.
A scope is either:
- A leaf: has a handler (and optionally filters), no children.
- A branch: has filters and children scopes, no handler.
Scopes are built at compile time by the DSL macros and stored as a nested structure. At runtime, the dispatcher walks this tree top-to-bottom to find the first matching handler.
Summary
Functions
Returns true if the scope is a leaf node (has a handler and no children).
Types
@type handler() :: {module(), atom(), 1 | 2} | (ExGram.Cnt.t() -> ExGram.Cnt.t()) | (term(), ExGram.Cnt.t() -> ExGram.Cnt.t())