Skip to main content

Module cli

Module cli 

Source
Expand description

Public CLI primitives for implementation-first command trees, parsed strategy dispatch, and strategy error types.

Structs§

Argument
ArgumentDefinition
Command
Metadata + handler pair for a single CLI command.
CommandBuilder
Fluent command builder that hides strategy implementation details.
CommandMetaData
User-facing metadata for a single CLI command.
FunctionStrategy
Adapter that turns a function or closure into a CommandStrategy.
StrategyError
Structured error returned by super::CommandStrategy::execute.
SubcommandRouter
Strategy helper implementing chain-of-responsibility style subcommand dispatch.
SwitchDefinition
Declarative value-taking option metadata.

Enums§

ArgumentValue
StrategyErrorKind
Categorizes strategy failures for downstream error handling.
ValueType

Traits§

CommandStrategy
Strategy contract for CLI command implementations.
SubcommandCatalog
Optional help-time capability exposed by strategies that can route to child strategies.

Functions§

argument
creates a value-taking option declaration.
argument_of_type
command
Creates a fluent command builder.
switch
creates a value-taking option declaration with the required flag set to true.