1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! # <span style="color:orange">IGC Parser</span>
//! A <span style="color:orange"><strong>*high-level*</strong></span> parsing crate for IGC flight recorder files.
//! <br /> With most focus on:
//! - <span style="color:orange"><strong>*Easy*</strong></span> to use
//! - <span style="color:orange"><strong>*No run-time asserts*</strong></span> meaning that any errors will be through the ```Result``` type
//! - A <span style="color:orange"><em><strong>*panic free*</strong></em></span> crate
//!
//! You should use this crate if you want to <span style="color:orange"><strong>*easily, quickly*</strong></span> and <span style="color:orange"><strong>*safely*</strong></span> parse igc files.
//!
//! Look in `records` to see the different kind of records that can be parsed
//!
//! # examples
//! This is if you want all fixes that have parsed correctly. A similar approach is used for the other records.
//! ```rust
//! use std::fs;
//! use igc_parser::records::{fix::Fix, Record};
//! let file = fs::read_to_string("./examples/example.igc").unwrap().parse::<String>().unwrap();
//! let valid_fixes = file.lines().filter_map(|line| {
//! match Record::parse(line) {
//! Ok(Record::B(fix)) => Some(fix),
//! _ => None,
//! }
//! }).collect::<Vec<Fix>>();
//! println!("{}", valid_fixes.len())
//! ```
use Rc;
use Arc;
use crateIGCError;
type Result<T> = Result;
type StrWrapper = ;
type StrWrapper = ;
/// All different type of IGC records
/// For parsing entire file at once
/// Parsing errors
/// Builder for a parser to parse only specific kinds of records