Introduced preferences struct
This commit is contained in:
+15
-2
@@ -1,6 +1,13 @@
|
||||
use std::collections::HashMap;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
|
||||
use gtfs_structures::{Agency, Calendar, CalendarDate, RawStopTime, RawTrip, Route, Stop, TimepointType};
|
||||
|
||||
// This is to store the preferences for the GTFS(-R) side of the code.
|
||||
pub struct Preferences {
|
||||
pub route_numbers: HashSet<String>,
|
||||
pub stop_codes: HashSet<String>,
|
||||
}
|
||||
|
||||
use gtfs_structures::{Agency, Calendar, CalendarDate, RawStopTime, RawTrip, Route, Stop};
|
||||
|
||||
// The main GTFS struct. This is similar to (but not exactly) gtfs-structures::Gtfs because we don't need everything
|
||||
#[derive(Debug)]
|
||||
@@ -20,3 +27,9 @@ pub struct Gtfs {
|
||||
/// Stop times for the chosen stops and the chosen routes
|
||||
pub stop_times: HashMap<(String, u32), RawStopTime>,
|
||||
}
|
||||
|
||||
pub struct Arrival<'a> {
|
||||
pub route: &'a Route,
|
||||
pub stop: &'a Stop,
|
||||
pub timepoint: &'a TimepointType,
|
||||
}
|
||||
Reference in New Issue
Block a user