Crates.io | config-file |
lib.rs | config-file |
version | 0.2.3 |
source | src |
created_at | 2021-04-02 09:59:05.287863 |
updated_at | 2022-04-08 10:44:37.182744 |
description | Read and parse configuration file automatically |
homepage | |
repository | https://github.com/Keruspe/config-file |
max_upload_size | |
id | 377397 |
size | 11,301 |
config-file reads your configuration files and parse them automatically using their extension.
use config_file::FromConfigFile;
use serde::Deserialize;
#[derive(Deserialize)]
struct Config {
host: String,
}
let config = Config::from_config_file("/etc/myconfig.toml").unwrap();