#![allow(unused)] use std::{collections::HashMap, fs::read_to_string}; use serde::{Deserialize, Serialize}; mod daemon; #[derive(Serialize, Deserialize, Debug)] pub struct Config { pub title: String, pub daemon: daemon::Daemon, pub source: HashMap } impl Config { pub fn parse(path: &str) -> Result> { Ok(toml::from_str::(&read_to_string(path)?)?) } }