pub enum ParsedReport {
Metar(Box<Metar>),
Taf(Taf),
}Expand description
Result of a successful parse or parse_strict call.
Wraps either a fully parsed Metar or Taf report. Use pattern
matching to access the inner value:
use metar_taf_parser::{parse, ParsedReport};
let report = parse("METAR LIRF 121250Z 18010KT 9999 FEW030 18/12 Q1015").unwrap();
match report {
ParsedReport::Metar(m) => println!("station: {}", m.station),
ParsedReport::Taf(t) => println!("station: {}", t.station),
}The Metar variant is heap-allocated (Box<Metar>) to keep the enum size
small: Metar is significantly larger than Taf on the stack.
Variants§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ParsedReport
impl RefUnwindSafe for ParsedReport
impl Send for ParsedReport
impl Sync for ParsedReport
impl Unpin for ParsedReport
impl UnsafeUnpin for ParsedReport
impl UnwindSafe for ParsedReport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more