Expand description
Argv tokenizer + resolver.
This is the runtime side of #[derive(FdlArgs)]. The derive macro
builds an ArgsSpec from the struct’s fields + attributes, calls
parse on std::env::args(), then destructures the resulting
ParsedArgs into concrete field values.
The parser is opinionated: it does NOT implement every historical convention. What it supports is documented in the test block below, and that set is the contract.
Structs§
- Args
Spec - Declarative spec of what flags and positionals a CLI accepts. Built by
the
#[derive(FdlArgs)]output at runtime, consumed byparse. - Option
Decl - Declaration of a single option (long flag, optionally with short alias).
- Parsed
Args - Intermediate parsed result, shaped for the derive macro’s field extraction. Absence is encoded by a missing map entry.
- Positional
Decl - Declaration of a single positional argument.
Enums§
- Option
State - What happened to a single option on the command line.
Functions§
- parse
- Parse argv against a spec.
args[0]is the program name and is ignored.