[−][src]Struct gtfs_structures::Gtfs
Data structure with all the GTFS objects
This structure is easier to use than the RawGtfs structure.
Fields
read_duration: i64
calendar: HashMap<String, Calendar>
calendar_dates: HashMap<String, Vec<CalendarDate>>
stops: HashMap<String, Arc<Stop>>
routes: HashMap<String, Route>
trips: HashMap<String, Trip>
agencies: Vec<Agency>
shapes: HashMap<String, Vec<Shape>>
fare_attributes: HashMap<String, FareAttribute>
feed_info: Vec<FeedInfo>
Implementations
impl Gtfs
[src]
pub fn print_stats(&self)
[src]
pub fn new(gtfs: &str) -> Result<Gtfs, Error>
[src]
Reads from an url (if starts with http), or a local path (either a directory or zipped file) To read from an url, build with read-url feature See also Gtfs::from_url and Gtfs::from_path if you don’t want the library to guess
pub fn from_path<P>(path: P) -> Result<Gtfs, Error> where
P: AsRef<Path> + Display,
[src]
P: AsRef<Path> + Display,
Reads the GTFS from a local zip archive or local directory
pub fn from_url<U: IntoUrl>(url: U) -> Result<Gtfs, Error>
[src]
Reads the GTFS from a remote url The library must be built with the read-url feature
pub async fn from_url_async<U: IntoUrl>(url: U) -> Result<Gtfs, Error>
[src]
Asynchronously reads the GTFS from a remote url The library must be built with the read-url feature
pub fn from_reader<T: Read + Seek>(reader: T) -> Result<Gtfs, Error>
[src]
pub fn trip_days(&self, service_id: &str, start_date: NaiveDate) -> Vec<u16>
[src]
pub fn get_stop<'a>(&'a self, id: &str) -> Result<&'a Stop, Error>
[src]
pub fn get_trip<'a>(&'a self, id: &str) -> Result<&'a Trip, Error>
[src]
pub fn get_route<'a>(&'a self, id: &str) -> Result<&'a Route, Error>
[src]
pub fn get_calendar<'a>(&'a self, id: &str) -> Result<&'a Calendar, Error>
[src]
pub fn get_calendar_date<'a>(
&'a self,
id: &str
) -> Result<&'a Vec<CalendarDate>, Error>
[src]
&'a self,
id: &str
) -> Result<&'a Vec<CalendarDate>, Error>
pub fn get_shape<'a>(&'a self, id: &str) -> Result<&'a Vec<Shape>, Error>
[src]
pub fn get_fare_attributes<'a>(
&'a self,
id: &str
) -> Result<&'a FareAttribute, Error>
[src]
&'a self,
id: &str
) -> Result<&'a FareAttribute, Error>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Gtfs
impl Send for Gtfs
impl Sync for Gtfs
impl Unpin for Gtfs
impl UnwindSafe for Gtfs
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
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>,