16个版本

0.2.3 2024年4月12日
0.2.2 2023年9月15日
0.2.0 2023年4月17日
0.1.0 2023年1月11日
0.0.1 2022年3月28日

模板引擎 中排名第 140

Download history 41/week @ 2024-04-13 4/week @ 2024-05-18 1/week @ 2024-05-25 2/week @ 2024-06-29 37/week @ 2024-07-06 36/week @ 2024-07-27

每月下载量 73

MIT 许可证

16KB
396

使用示例

use serde::{Deserialize, Serialize};

pub const DEFAULT_CONFIG: &str = include_str!("../config.yaml");

#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct Config {
    pub port: u16,
    pub dry_run_mode: bool
}

impl Config {
    pub fn load() -> Result<Self, pepe_config::ConfigError> {
        pepe_config::load(DEFAULT_CONFIG, pepe_config::FileFormat::Yaml)
    }
}

依赖项

~2.1–3MB
~63K SLoC