use serde::Deserialize; #[derive(Debug, Deserialize, Clone)] pub struct DetectorFile { #[serde(rename = "type")] pub file_type: String, // "FeatureCollection" pub features: Vec, } #[derive(Debug, Deserialize, Clone)] pub struct Feature { #[serde(rename = "type")] pub feature_type: String, // "Feature" pub geometry: Geometry, pub properties: Properties, } #[derive(Debug, Deserialize, Clone)] pub struct Geometry { #[serde(rename = "type")] pub geometry_type: String, // "Point" pub coordinates: [f64; 2], } #[derive(Debug, Deserialize, Clone)] pub struct Properties { pub station: i32, pub user: i32, pub generation: String, pub status: String, // Sometimes string timestamp, sometimes number 0 pub signal_last_ctime: serde_json::Value, pub region_mask: i32, pub comment: Option, pub controller_board: Option, pub firmware: Option, pub city: Option, pub country: Option, pub website: Option, pub counters: Vec, pub user_stations: Vec, } #[derive(Debug, Deserialize, Clone)] pub struct Counter { pub region: i32, pub all: i32, pub valid: i32, pub member: i32, pub used: i32, pub min_distance: i64, pub max_distance: i64, }