[][src]Enum igc::records::Record

pub enum Record<'a> {
    A(ARecord<'a>),
    B(BRecord<'a>),
    CDeclaration(CRecordDeclaration<'a>),
    CTurnpoint(CRecordTurnpoint<'a>),
    D(DRecord<'a>),
    E(ERecord<'a>),
    F(FRecord<'a>),
    G(GRecord<'a>),
    H(HRecord<'a>),
    I(IRecord<'a>),
    J(JRecord<'a>),
    K(KRecord<'a>),
    L(LRecord<'a>),
    Unrecognised(&'a str),
}

Sum type of all possible records in an IGC file.

Variants

A(ARecord<'a>)B(BRecord<'a>)CDeclaration(CRecordDeclaration<'a>)CTurnpoint(CRecordTurnpoint<'a>)D(DRecord<'a>)E(ERecord<'a>)F(FRecord<'a>)G(GRecord<'a>)H(HRecord<'a>)I(IRecord<'a>)J(JRecord<'a>)K(KRecord<'a>)L(LRecord<'a>)Unrecognised(&'a str)

Wildcard record type, containing the string that wasn't recognized.

Methods

impl<'a> Record<'a>[src]

pub fn parse_line(line: &'a str) -> Result<Self, ParseError>[src]

Perform a minimal parsing of a single IGC file line.

use igc::records::{DataSource, Record};
match Record::parse_line("HFFTYFRTYPE:LXNAV,LX8000F") {
    Ok(Record::H(header_rec)) => {
        assert_eq!(header_rec.data_source, DataSource::FVU);
        assert_eq!(header_rec.mnemonic, "FTY");
        assert_eq!(header_rec.friendly_name, Some("FRTYPE"));
        assert_eq!(header_rec.data, "LXNAV,LX8000F");
    }
    _ => unreachable!(),
}

Trait Implementations

impl<'a> Eq for Record<'a>[src]

impl<'a> PartialEq<Record<'a>> for Record<'a>[src]

impl<'a> Debug for Record<'a>[src]

impl<'a> Display for Record<'a>[src]

Auto Trait Implementations

impl<'a> Send for Record<'a>

impl<'a> Sync for Record<'a>

Blanket Implementations

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]