diff options
| author | kboz <kutayboz@gmail.com> | 2026-04-24 01:11:23 +0200 |
|---|---|---|
| committer | kboz <kutayboz@gmail.com> | 2026-04-24 01:11:23 +0200 |
| commit | 29c4b57db9a34e0f815d93cac6a2cae543778a93 (patch) | |
| tree | 68628e0b67353bcf74b5c516e5a2f0893cd598b7 /rust_backend/src/pathfinding/models.rs | |
| parent | e43c98997b0de6a8da989f68d97f1d4f7fb7bb6f (diff) | |
| download | haul-master.tar.gz | |
- Added a 2026 copyright statement under the original creator's in `license.md` to properly establish new fork logic.
- Updated `readme.md` to explicitly state this repository is a maintained fork.
- Eliminated the `rust_backend/` directory, Actix codebase, and its associated launch configurations.
- Purged all references specifying a Python/Rust/React tri-split from `AGENTS.md` and the frontend `.instructions.md` configuration.
Co-authored-by: Copilot <copilot@github.com>
Diffstat (limited to 'rust_backend/src/pathfinding/models.rs')
| -rw-r--r-- | rust_backend/src/pathfinding/models.rs | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/rust_backend/src/pathfinding/models.rs b/rust_backend/src/pathfinding/models.rs deleted file mode 100644 index 4bbc580..0000000 --- a/rust_backend/src/pathfinding/models.rs +++ /dev/null @@ -1,86 +0,0 @@ -use serde::{Deserialize, Deserializer, Serialize}; -use std::str::FromStr; -use std::collections::HashMap; - - -#[derive(Deserialize, Serialize, Clone)] -pub struct Location { - pub solar_system_id: i32, - pub station_id: Option<i32>, - pub structure_id: Option<i32>, -} - -#[derive(Deserialize, Serialize, Clone, Debug)] -pub struct RawNode { - pub itemID: u64, - pub typeID: u64, - pub groupID: u64, - #[serde(deserialize_with = "deserialize_optional_u64")] - pub solarSystemID: Option<u64>, - #[serde(deserialize_with = "deserialize_optional_u64")] - pub constellationID: Option<u64>, - #[serde(deserialize_with = "deserialize_optional_u64")] - pub regionID: Option<u64>, - #[serde(deserialize_with = "deserialize_optional_u64")] - pub orbitID: Option<u64>, - pub x: Option<f64>, - pub y: Option<f64>, - pub z: Option<f64>, - #[serde(deserialize_with = "deserialize_optional_f64")] - pub radius: Option<f64>, - pub itemName: Option<String>, - #[serde(deserialize_with = "deserialize_optional_f64")] - pub security: Option<f64>, -} - - -fn deserialize_optional_u64<'de, D>(deserializer: D) -> Result<Option<u64>, D::Error> -where - D: Deserializer<'de>, -{ - let s: Option<String> = Option::deserialize(deserializer)?; - match s.as_deref() { - Some("None") | Some("") => Ok(None), // Handle "None" and empty strings - Some(str_val) => u64::from_str(str_val) - .map(Some) - .map_err(serde::de::Error::custom), - None => Ok(None), - } -} - -fn deserialize_optional_f64<'de, D>(deserializer: D) -> Result<Option<f64>, D::Error> -where - D: Deserializer<'de>, -{ - let s: Option<String> = Option::deserialize(deserializer)?; - match s.as_deref() { - Some("None") | Some("") => Ok(None), // Handle "None" and empty strings - Some(str_val) => str_val.parse::<f64>() - .map(Some) - .map_err(serde::de::Error::custom), - None => Ok(None), - } -} - -#[derive(Debug)] -pub struct MapNode { - pub item_id: u64, - pub is_station: bool, - pub solar_system_id: u64, - pub region_id: u64, - pub x: f64, - pub y: f64, - pub z: f64, - pub name: String, - pub security: f64, -} - -#[derive(Deserialize, Serialize, Clone, Debug)] -pub struct Connection { - stargate_id: u64, - destination_id: u64, -} - - - -pub type Graph = HashMap<u64, Vec<u64>>;
\ No newline at end of file |
