Crates.io | yaac |
lib.rs | yaac |
version | 0.1.2 |
source | src |
created_at | 2023-10-30 07:08:05.002453 |
updated_at | 2023-10-31 06:53:56.092465 |
description | yet another another config lib for web application |
homepage | https://github.com/Kilerd/yaac |
repository | |
max_upload_size | |
id | 1018178 |
size | 26,092 |
${APP_KEY_NAME}
${parent.sub.key_name}
$ cargo add yaac
#[derive(Debug, Deserialize)]
struct Config {
original: String,
value: String,
}
fn main() {
let mut loader = ConfigLoader::new();
loader.add_source(FileSource::new("configuration/application.toml"));
loader.add_source(FileSource::new("configuration/application_database.toml"));
loader.add_source(EnvironmentSource::new("APP"));
loader.enable_environment_variable_processor();
loader.enable_path_variable_processor();
let config: Config = loader.construct()?;
}
Want to join us? Check out our "Contributing" guide and take a look at some of these issues:
This project is licensed under MIT license (LICENSE-MIT or [http://opensource.org/licenses/MIT]).