[−][src]Struct igc::records::CRecordDeclaration
The first flavor of C Record - a task record which defines some properties of the whole task.
The IGC specification states that a conforming file containing a task declaration will contain a CRecordDeclaration, immediately followed (turnpoint_count + 4) CRecordTurnpoints. The extra 4 turnpoints are for the takeoff/land locations, and the task start/finish locations
Fields
date: Date
time: Time
flight_date: Option<Date>
task_id: u16
turnpoint_count: i8
task_name: Option<&'a str>
Methods
impl<'a> CRecordDeclaration<'a>
[src]
pub fn parse(line: &'a str) -> Result<Self, ParseError>
[src]
Parse a string as a C record task declaration
let record = CRecordDeclaration::parse("C230718092044000000000204Foo task").unwrap(); assert_eq!(record.date, Date::from_dmy(23, 7, 18)); assert_eq!(record.time, Time::from_hms(9, 20, 44)); assert_eq!(record.task_id, 2); assert_eq!(record.turnpoint_count, 4); assert_eq!(record.task_name, Some("Foo task"));
Trait Implementations
impl<'a> Eq for CRecordDeclaration<'a>
[src]
impl<'a> PartialEq<CRecordDeclaration<'a>> for CRecordDeclaration<'a>
[src]
fn eq(&self, other: &CRecordDeclaration<'a>) -> bool
[src]
fn ne(&self, other: &CRecordDeclaration<'a>) -> bool
[src]
impl<'a> Display for CRecordDeclaration<'a>
[src]
impl<'a> Debug for CRecordDeclaration<'a>
[src]
Auto Trait Implementations
impl<'a> Send for CRecordDeclaration<'a>
impl<'a> Sync for CRecordDeclaration<'a>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,