Expand description
The native command line as command-graph nodes.
clap is the declaration; this walks it. Nothing here restates a command, an argument, a
default or a description — crate::cli::docs::tree already turns the built
clap::Command into data for the reference pages, and this is a second reading of the
same tree, not a second tree.
Three things are added that clap cannot hold, each from a place that already owns it:
- the semantics — effect, interactivity, requirements — from
super::semantics; - the capability behind a command, joined through the registry’s own
crate::capability::model::CliExposure, which also proves the two agree; - the value source of each argument, inferred from the declaration first and annotated only where the type clap erased is one a registry here knows.
§Why the join is checked
A capability may declare that it is reached as majordomus x y. Nothing dispatched
from that declaration before this module existed: the clap arm was written separately,
and a capability whose cli exposure named a command that was never added produced a
documented command that did not exist. The join reports that as an error, which turns a
silent documentation defect into a failing build.
Structs§
- Contribution
- What the walk produced.
Constants§
- NATIVE_
REQUIREMENTS - The requirements every native command shares, for a reader that wants the default without constructing a node.
Functions§
- contribute
- Walk the built command line into nodes, joined against the capability registry.