Skip to main content

find_leaf

Function find_leaf 

Source
pub fn find_leaf<'a>(
    tree: &'a [CommandNode],
    path: &[&str],
) -> Option<&'a CommandNode>
Expand description

Walk a command path (["reports", "balance"]) down the tree and return the matching leaf. Returns None when any segment is unknown or when the path does not terminate at a runnable command.