Expand description
The clap tree, and the trip back from ArgMatches to a sent request.
The tree is two levels: one subcommand per resource the document groups its
paths into, and one subcommand under that per operation — vouchers update
rather than update-voucher. Both names are decided while the document is
reduced and travel in the reduced model, so nothing here derives them.
commands turns the document into those subcommands and dispatch runs
whichever one the user typed, so an adopter who wants the generated surface
and nothing else writes those two calls and renders the Outcome.
select and Selection::send are the same trip with a seam in the
middle, for an adopter who has a check of their own to make — holding the
body to a generated type, say — between what the user typed and what goes
out. dispatch is the two of them in order.
The flag-to-wire-name translation lives here and nowhere else: below this module the vocabulary is the document’s own names, which is why a Rust caller can use the same request builder without ever meeting a flag.
Structs§
- Selection
- One operation the user named, with its arguments read and its gate answered — everything needed to send it, and nothing sent yet.
Enums§
- ArgError
- Something about the arguments the document cannot repair.
- Dispatch
Error - Why an operation the user named did not run.
- Outcome
- What running one operation produced.
Functions§
- command
- The subcommand for one operation.
- commands
- One subcommand per group, in document order, holding the operations under it in document order.
- confirmed
- Did the user confirm this operation? A read carries no
--commitflag, so there is nothing to ask it. - dispatch
select, thenSelection::send: the whole generated surface in one call, for an adopter with no check of their own to make.- select
- Read the two subcommands the user typed, whichever command the groups were mounted on.
- values
- Read one operation’s arguments out of its
ArgMatches, under the names the document uses.