edjr 0.1.3

Elite Dangerous Journal Reader
Documentation
use {
    crate::elite::{
        body::BodyType,
        faction::{Faction, FactionConflict},
        powerplay::Powerplay,
        station::Station,
        system::System,
    },
    serde::Deserialize,
};

#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct LocationEvent {
    pub body: String,
    #[serde(alias = "BodyID")]
    pub body_id: u64,
    pub body_type: BodyType,
    pub latitude: Option<f64>,
    pub longitude: Option<f64>,
    #[serde(flatten)]
    pub powerplay: Option<Powerplay>,
    #[serde(flatten)]
    pub system: Option<System>,
    #[serde(flatten)]
    pub station: Option<Station>,
    pub conflicts: Option<Vec<FactionConflict>>,
    pub controlling_power: Option<String>,
    pub dist_from_star_ls: Option<f64>,
    pub factions: Option<Vec<Faction>>,
    pub population: u64,
    pub star_pos: [f64; 3],
    pub star_system: String,
    pub system_address: u64,
    #[serde(default, alias = "InSRV")]
    pub in_srv: bool,
    #[serde(default)]
    pub docked: bool,
    #[serde(default)]
    pub multicrew: bool,
    #[serde(default)]
    pub on_foot: bool,
    #[serde(default)]
    pub taxi: bool,
    #[serde(default)]
    pub wanted: bool,
    // TODO: thargoid war
}