use serde::Deserialize; use std::collections::HashMap; #[derive(Deserialize)] pub struct Shot { pub filename: Option, pub json: Option, pub title: String, pub cutoff: Option, pub disable: Option, } #[derive(Deserialize)] pub struct Chart { pub title: String, pub shots: Vec, pub max_time: u64, pub max_weight: u64, pub max_flow: u64, } #[derive(Deserialize)] pub struct Config { pub shots: HashMap, pub charts: HashMap, pub shot_dir: String, pub brew_dir: String, pub data_dir: String, pub output_dir: String, pub main_json: String, pub width: u32, pub height: u32, } pub const WGHT_SHEET: usize = 0; pub const FLOW_SHEET: usize = 1; pub const TIME_COL: usize = 0; pub const WGHT_COL: usize = 5; pub const FLOW_COL: usize = 2; pub struct Data { pub weight: Vec<(f64, f64)>, pub flowrate: Vec<(f64, f64)>, }