use std::time::Duration; use serde::{Deserialize, Serialize}; use crate::types::Coords; #[derive(Serialize, Deserialize, Clone, Debug)] pub struct Config { pub watch_interval: Duration, pub coords: Coords, pub serial_port: String, pub baud_rate: u32, } impl Default for Config { fn default() -> Self { Self { watch_interval: Duration::from_secs(60), coords: Coords { latitude: 0., longitude: 0., }, serial_port: String::from("/dev/ttyUSB0"), baud_rate: 9600, } } }