Skip to main content

Crate usage_dynamic

Crate usage_dynamic 

Source
Expand description

Runtime commands for a derive-generated usage-rs host.

A CLI that has plugins knows what host plugin-x is only after it has read its own configuration, which is long after the tables describing the rest of its CLI were compiled. Those tables stay as they are: an application discovers and caches plugin specs itself, and a Catalog attaches them beneath a static command that declared an external_subcommand catch-all.

What that buys is the three things the static tables cannot answer for a command they have never seen: help that lists and navigates runtime commands, completion that descends into them, and a parse of the argv the catch-all captured. Nothing here mutates the derived parse tables or the KDL they emit, and nothing here runs a subprocess, reads a file, or calls back into the application.

Structs§

App
Help and completion over the whole command tree, static and runtime alike.
Builder
A catalog under construction.
Catalog
A validated collection of caller-supplied runtime command specs.
Help
ParseOutput
Parsed
Spec
SpecArgBuilder
Builder for SpecArg
SpecCommandBuilder
Builder for SpecCommand
SpecFlagBuilder
Builder for SpecFlag
Version

Enums§

Error
A catalog construction or dynamic parse failure.
Outcome
The result of parsing a catalogued external command.