Skip to main content

Module args

Module args 

Source
Expand description

Turn one resolved cli-spec-v1 invocation into the typed command the async dispatcher runs.

The registry in crate::cli::spec has already decided that the argv is legal, which shape it matched, and what every value’s type is. What is left here is projection: reading those values, applying the two environment fallbacks the registry cannot see (AFHTTP_ENDPOINT_URL and AFHTTP_TOKEN_SECRET), and narrowing registry integers to the unsigned ranges the domain types use.

Projection stays pure. A --token-secret source is classified here but read later, and a missing endpoint is carried here but discovered later, so nothing in this file opens a file, spawns a container runtime, or reaches a host — argv is either legal or it is not, before any of that can happen.

Enums§

Command
One dispatchable command, already projected off its invocation.

Functions§

handlers
Exactly one handler per action id in the registry; bind_actions proves the two sets match at startup.

Type Aliases§

Projected
What every action handler produces. Projection can still fail — an endpoint that is neither on argv nor in the environment, an integer outside its domain range — and those are argument errors, not run failures.