Expand description
Provides a general solution to maintain configuration spanned across different sources.
- Default Values
- System configuration
- User configuration
- Public project configuration (tracked by Git)
- Private (local) project configuration (not tracked by Git)
- Environment variables
- Command line options
The configuration keys are string. Configuration values can be:
- string
- bool
- int
- float
Configuration files are in TOML.
Options can be nested like group.name = value
.
Each option can be tracked to its source via XvcConfigOption.
Re-exports§
pub use config_params::XvcConfigParams;
Modules§
- Specify configuration sources
- Error types for the config crate.
Macros§
- Binds a type with a configuration key.
Structs§
- System specific configuration directory. see directories_next::ProjectDirs.
- User configuration directories. See directories_next::BaseDirs.
- User directories. see directories_next::UserDirs.
- Keeps track of all Xvc configuration.
- A set of options defined as a TOML document from a single XvcConfigOptionSource
- The option and its source.
- A configuration value with its source
Enums§
- Define the source where an option is obtained
- Verbosity levels for Xvc CLI
Traits§
- A struct implementing this trait can instantiate itself from XvcConfig.
- Trait to update CLI options with defaults from configuration.
Functions§
- Convert a TomlValue which can be a TomlValue::Table or any other simple type to a hash map with keys in the hierarchical form.