[][src]Struct gtfs_structures::Gtfs

pub struct Gtfs {
    pub read_duration: i64,
    pub calendar: HashMap<String, Calendar>,
    pub calendar_dates: HashMap<String, Vec<CalendarDate>>,
    pub stops: HashMap<String, Arc<Stop>>,
    pub routes: HashMap<String, Route>,
    pub trips: HashMap<String, Trip>,
    pub agencies: Vec<Agency>,
    pub shapes: HashMap<String, Vec<Shape>>,
    pub fare_attributes: HashMap<String, FareAttribute>,
    pub feed_info: Vec<FeedInfo>,
}

Data structure with all the GTFS objects

This structure is easier to use than the RawGtfs structure.

Fields

read_duration: i64calendar: 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>

Methods

impl Gtfs[src]

impl Gtfs[src]

pub fn print_stats(&self)[src]

pub fn new(path: &str) -> Result<Gtfs, Error>[src]

pub fn from_zip(file: &str) -> Result<Gtfs, Error>[src]

pub fn from_url(url: &str) -> Result<Gtfs, Error>[src]

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, ReferenceError>[src]

pub fn get_trip<'a>(&'a self, id: &str) -> Result<&'a Trip, ReferenceError>[src]

pub fn get_route<'a>(&'a self, id: &str) -> Result<&'a Route, ReferenceError>[src]

pub fn get_calendar<'a>(
    &'a self,
    id: &str
) -> Result<&'a Calendar, ReferenceError>
[src]

pub fn get_calendar_date<'a>(
    &'a self,
    id: &str
) -> Result<&'a Vec<CalendarDate>, ReferenceError>
[src]

pub fn get_shape<'a>(
    &'a self,
    id: &str
) -> Result<&'a Vec<Shape>, ReferenceError>
[src]

pub fn get_fare_attributes<'a>(
    &'a self,
    id: &str
) -> Result<&'a FareAttribute, ReferenceError>
[src]

Trait Implementations

impl Default for Gtfs[src]

Auto Trait Implementations

impl Send for Gtfs

impl Sync for Gtfs

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.