Skip to main content

try_sub_dispatch

Function try_sub_dispatch 

Source
pub fn try_sub_dispatch(cmd_name: &str, tokens: &[Token]) -> Option<Verdict>
Expand description

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).