Introduced preferences struct

This commit is contained in:
2026-03-28 10:24:51 +00:00
parent a22e1ee3fa
commit 34dad5e000
4 changed files with 37 additions and 10 deletions
+15 -2
View File
@@ -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,
}