Module adsbx_json::v2 [−][src]
Parses version 2 of the ADS-B Exchange API JSON format.
use adsbx_json::v2::Response; use std::str::FromStr; let response = Response::from_str(&json_str).unwrap(); println!("Got {} aircraft", response.aircraft.len()); let ac = &response.aircraft[0]; println!("ICAO: {}", ac.hex); if let Some(reg) = &ac.registration { println!("Registration: {}", reg); } if let (Some(lat), Some(lon)) = (ac.lat, ac.lon) { println!("Aircraft is at {}, {}", lat, lon); }
Structs
Aircraft | An aircraft. (Might not actually be an aircraft—could be a ground vehicle, or a test beacon.) |
DatabaseFlags | Flags an aircraft may have in the ADS-B Exchange database. |
ParseError | Represents a parsing error. |
Response | The ADS-B Exchange API response. This has most of the info you want :) |
Enums
AltitudeOrGround | Describes the status of an aircraft, either airborne or on the ground. |
Emergency | |
MessageType | Describes the source of a message. |
NavMode | |
SilType |