Expand description
Command dispatch and orchestration for clap-based CLIs.
Routes parsed ArgMatches to a Handler, running pre-dispatch, handler,
post-dispatch, and post-output hooks around it, and returns typed
HandlerResult data — presentation stays with the consuming framework.
A handler adapter takes (&ArgMatches, &CommandContext) and returns
serializable data, so application logic stays reusable outside a CLI.
CommandContext carries two kinds of injected state: app_state is
immutable and app-lifetime (database, config, API clients), built once
and shared via Rc; extensions is mutable and per-request, set by
pre-dispatch hooks for things like a resolved user session.
Re-exports§
pub use artifact::Artifact;pub use artifact::ArtifactDestination;pub use artifact::ArtifactReceipt;pub use artifact::ArtifactRun;
Modules§
Structs§
- Artifact
Output - Command
Context - Exit
Status - Extensions
- External
Failure - FnHandler
- Hook
Error - Hooks
- Invalid
External Status - RunError
- RunOutput
- Simple
FnHandler - Text
Output
Enums§
Traits§
Functions§
- extract_
command_ path - get_
deepest_ matches - has_
subcommand - insert_
default_ command - path_
to_ string - string_
to_ path