First set of changes to use config file instead of hard-coded settings.

This commit is contained in:
2026-05-23 11:25:41 +01:00
parent 391380040e
commit 74aa9e8a84
6 changed files with 85 additions and 19 deletions
+22
View File
@@ -0,0 +1,22 @@
use crate::{gtfs, renderer};
use std::collections::HashSet;
extern crate serde_derive;
extern crate serde_yaml;
struct Error {
message: String
}
#[derive(Debug, PartialEq, Serialize, Deserialize)]
struct Config {
#[serde(rename = "gtfs")]
pub gtfs_prefs: gtfs::structs::Preferences,
#[serde(rename = "screen")]
pub screen_prefs: renderer::structs::Prefs,
}
pub fn load_config(config_name: String) -> Result<Config, Error> {
return Err(Error { message: String::from("Foo") });
}