Crate spirit_cfg_helpers
source ·Expand description
Spirit configuration helpers
These helpers are meant to integrate into the spirit configuration framework. They aim at making the user experience around application’s configuration more smooth for the user. Specifically, they allow dumping the configuration collected through all the config files and environment variables and printing help about all the configuration options the application accepts.
Features
By default, all features are turned on. However, it is possible to opt out of some to cut down on dependencies. Specifically:
toml
andjson
features enable dumping in the respective formats.cfg-help
enables the printing of configuration help.
Structs
A command line fragment add
--dump-config
to allow showing loaded configuration.A command line options fragment to add the
--help-config
option.Functions
A helper to log changes of configuration every time it is reloaded.