config-file

Crates.ioconfig-file
lib.rsconfig-file
version0.2.3
sourcesrc
created_at2021-04-02 09:59:05.287863
updated_at2022-04-08 10:44:37.182744
descriptionRead and parse configuration file automatically
homepage
repositoryhttps://github.com/Keruspe/config-file
max_upload_size
id377397
size11,301
Marc-Antoine Perennou (Keruspe)

documentation

https://docs.rs/config-file

README

config-file

API Docs Downloads

Read and parse configuration file automatically

config-file reads your configuration files and parse them automatically using their extension.

Features

  • toml is enabled by default
  • json is optional
  • xml is optional
  • yaml is optional

Examples

use config_file::FromConfigFile;
use serde::Deserialize;

#[derive(Deserialize)]
struct Config {
    host: String,
}

let config = Config::from_config_file("/etc/myconfig.toml").unwrap();
Commit count: 25

cargo fmt