Skip to main content

Module args

Module args 

Source
Expand description

Argv parsing primitives and the FdlArgsTrait contract that #[derive(FdlArgs)] implements. Argv parser and FdlArgs trait — the library side of the #[derive(FdlArgs)] machinery.

The derive macro in flodl-cli-macros emits an impl FdlArgsTrait for Cli that delegates to the parser exposed here. Binary authors do not import this module directly — they use #[derive(FdlArgs)] and parse_or_schema::<Cli>() from the top-level flodl_cli crate.

Modules§

parser
Argv tokenizer + resolver.

Traits§

FdlArgsTrait
Trait implemented by #[derive(FdlArgs)]. Carries the metadata needed to parse argv into a concrete type and to emit the --fdl-schema JSON.

Functions§

parse_or_schema
Intercept --fdl-schema and --help, otherwise parse argv.
parse_or_schema_from
Slice-based variant of parse_or_schema. The first element is the program name (displayed in help text), the rest are arguments.