Re-exports§
pub use clap;pub use encryptable_tokio_fs;
Enums§
- Error
- Error variants for the
cli-configstrait
Traits§
- CmdLine
AndConfig Integration - Trait to allow merging command line options into the application’s configs
- Ogre
Root Config - Trait to be implemented by root config types, enabling them to be written / loaded from disk
Functions§
- documented_
config_ models - Gives access to the configuration documentation, so they may be included when saving config files, for a better user experience
- get_
config_ file_ path - Determines the exact path for the configuration file to be used, taking into account:
- load_
from_ file - Attempts to read & parse the configuration from the given
config_file_path. ReturnsOk(None)if the file doesn’t exist. See also the higher level load_or_create_default(). - load_
or_ create_ default - Loads the configuration from the given
config_file_pathor creates it (with default values & comments) if it doesn’t exist. See also the low level load_from_file() and save_to_file(). - merge_
cmdline_ args_ with_ configs - Returns the “effective configuration” applications should use:
given the specific
root_configandcmdline_options, merge the former into the latter - parse_
cmdline_ and_ merge_ with_ loaded_ configs - Similarly to parse_cmdline_args(), parse the CLI options from the program’s command line args, but also load the configs and merge_cmdline_args_with_configs(), then return the effective configuration the application must use
- parse_
cmdline_ args - Parse the CLI options from the program’s command line args. Most likely you’d like to use [parse_cmdline_and_merge_with_configs()]
- save_
to_ file - Saves the
configtoconfig_file_path, including the giventail_documentationat the end of the file (maybe gathered from the original [config_model] sources). See also the higher level load_or_create_default().