Skip to main content

Module registry

Module registry 

Source

Structs§

CommandSpec
OwnedPolicy

Functions§

build_registry
custom_dispatch
Looks up the command in the runtime custom registry (project-local .safe-chains.toml, then user-level ~/.config/safe-chains.toml). A match here wins over the built-in hardcoded handlers, which is how an override of gh takes effect.
dispatch_spec
load_toml
toml_command_docs
toml_command_names
toml_dispatch
try_fallback_grammar
Apply cmd_name’s TOML-declared [command.fallback] grammar. Returns None if no fallback is declared.
try_sub_dispatch
Look up cmd_name’s TOML-declared subs (set via [[command.sub]] blocks alongside handler = "...") and dispatch the one whose name matches tokens[1]. Returns None if no sub matched, so the handler can fall through to its fallback grammar (or deny).