Expand description
viperus is an (in)complete configuration solution for Rust applications.
I have already said that it is incomplete? use at your own risk. ;-) viperus handle some types of configuration needs and formats.
- setting defaults
- reading from JSON, TOML, YAML, dotenv file ,java properties config files
- reading from environment variables
- reading from Clap command line flags
- setting explicit values
- reload of all files
- whatch config files and reolad all in something changes
- caching Viperus uses the following decreasing precedence order.
- explicit call to
add
- clap flag
- config
- env variables
- default
Macros§
Structs§
Enums§
- Format
- preconfigured file formats with stock adapters
- Viperus
Error - Viperus
Value - ViperusValue encaspule data values of type String,i32 and bool
Traits§
- Config
Adapter - ConfigAdapter mediates from varius config format and Viperus
Functions§
- add
- add an override value to the cofiguration
- add_
default - add an default value to the global cofiguration
- automatic_
env - whan enabled viperus will check for an environment variable any time Get request is made checking for a environment variable with a name matching the key uppercased and prefixed with the env_prefix if set.
- bond_
clap - bond a clap argsument to a config key
- cache
- cache the query results for small configs speedup is x4 from v 0.1.9 returns the previus state , useful for test setups.
- get
- get a configuration value of type T from global configuration in this order
- load_
adapter - load_adapter ask the adapter to parse her data and merges result map in the internal configurtion map of global instance
- load_
clap - load_clap brings in the clap magic
- load_
file - load_file load a config file in the global instance
- reload
- reload the configuration files
- set_
env_ prefix - prepend ‘pefix’ when quering envirment variables
- watch_
all - Watch the config files and autoreload in case of change