Expand description
clap-config-fallback extends clap with configuration-file fallback while preserving clap as
the final parser/validator.
Typical flow:
- Parse CLI args into an optional intermediate struct.
- Load config values from
#[config(path)](if provided). - Merge with precedence
CLI > config. - Re-run clap on reconstructed arguments for final validation.
Modules§
Structs§
Enums§
- Config
Format - Supported configuration file formats.
Traits§
- Config
Fallback - Defines the associated types for config fallback parsing.
- Config
Parser - Parse a clap struct with optional configuration-file fallback.
- Config
Source - Provides configuration path and format discovery for fallback loading.
- From
Args - Builds an intermediate options struct from clap
ArgMatches. - Into
Args - Converts an intermediate options struct into synthetic CLI args.
Derive Macros§
- Config
Args - Derives
clap_config_fallback::ConfigArgsfor clapArgsstructs. - Config
Parser - Derives
clap_config_fallback::ConfigParserfor a clapParserroot struct. - Config
Subcommand - Derives
clap_config_fallback::ConfigSubcommandfor clapSubcommandenums.