Crate metar[−][src]
METAR parsing library for Rust
Quick usage
This simple usage will print out the parsed data from the METAR.
use metar::Metar; fn main() { let metar = "EGHI 282120Z 19015KT 140V220 6000 RA SCT006 BKN009 16/14 Q1006"; let r = Metar::parse(metar).unwrap(); println!("{:#?}", r); }
Issues
METARs are complicated structures. If you come across a METAR that doesn’t parse correctly, please open an issue and include the METAR. This will aid in debugging the issue significantly.
Structs
Metar | A complete METAR |
MetarError | An error when parsing a METAR |
Pressure | Measured air pressure |
Time | A struct to store time as it is represented in a METAR |
Visibility | Horizontal visibility |
Weather | A weather information block |
Wind | Wind information |
WindSpeed | A struct representing the wind speed |
Enums
CloudLayer | Cloud cover |
CloudType | A cloud type description |
CloudVisibilityError | An error caused when parsing the cloud and visibility information |
Clouds | Cloud state |
Data | Data that is provided in a metar which might be unknown.
Note that this differs from an |
DistanceUnit | Units of distance |
ObservationTimeError | An error caused when parsing the observation time |
ParseState | The state of the parser, used in error messages to describe the expected next occurence when it wasn’t reached. |
ParserError | An error from an internal parser |
PressureError | An error caused when parsing the pressure |
PressureUnit | Units of air pressure |
SpeedUnit | Units of speed |
StationError | An error caused whilst parsing the weather station |
TemperatureError | An error caused when parsing the temperature |
VertVisibility | Vertical visibility measurement |
WeatherCondition | Descriptor of weather |
WeatherIntensity | Intensity of weather |
WindDirection | A representation of wind direction |
WindError | An error caused when parsing the wind |
WindVaryingError | An error caused when parsing the wind varying |