intermodal/bin/gen/src/config.rs
Casey Rodarmor 9098d36840
Readme improvements
- Mention various chat channels
- Add `intermodal-bin` package to package table
- Document `bin/gen`
- Add contributing section
- Link to book

type: documentation
2020-04-17 23:28:08 -07:00

19 lines
403 B
Rust

use crate::common::*;
const PATH: &str = "bin/gen/config.yaml";
#[derive(Deserialize)]
pub(crate) struct Config {
pub(crate) changelog: BTreeMap<String, Metadata>,
pub(crate) examples: Vec<Example>,
pub(crate) packages: Vec<Package>,
}
impl Config {
#[throws]
pub(crate) fn load(root: &Path) -> Config {
let file = File::open(root.join(PATH))?;
serde_yaml::from_reader(file)?
}
}