This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
md-pdf-rs/src/config/mod.rs

25 lines
421 B
Rust
Raw Normal View History

2017-07-17 09:52:22 +01:00
use serde_yaml;
pub mod read;
pub mod validate;
2017-07-17 09:59:54 +01:00
pub mod consts;
2017-07-17 09:52:22 +01:00
#[derive(Debug, Serialize, Deserialize)]
pub struct Config {
foo: String
}
impl Config {
2017-07-17 14:53:18 +01:00
fn new(raw: String) -> Config {
return serde_yaml::from_str(&raw).unwrap();
}
2017-07-17 09:52:22 +01:00
}
pub fn get_config() {
let config_str = read::read();
2017-07-17 14:53:18 +01:00
let config = Config::new(config_str);
2017-07-17 09:52:22 +01:00
println!("{:?}", config);
validate::validate(config);
}