[−][src]Crate viperus
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.
It supports:
- setting defaults
- reading from JSON, TOML, YAML, envfile config files
- reading from environment variables
- reading from Clap command line flags
- setting explicit values
Viperus uses the following decreasing precedence order.
- explicit call to
add - clap flag
- env
- config
- default
Macros
| path |
Structs
| Map | |
| Viperus | A unified config Facade |
Enums
| Format | preconfigured file formats with stock adapters |
| ViperusError | |
| ViperusValue | ViperusValue encaspule data values of type String,i32 and bool |
Traits
| ConfigAdapter | 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 |
| bond_clap | bond a clap argsument to a config key |
| 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 |
Type Definitions
| AdapterResult |