pub struct RawGtfs {
Show 16 fields pub read_duration: i64, pub calendar: Option<Result<Vec<Calendar>, Error>>, pub calendar_dates: Option<Result<Vec<CalendarDate>, Error>>, pub stops: Result<Vec<Stop>, Error>, pub routes: Result<Vec<Route>, Error>, pub trips: Result<Vec<RawTrip>, Error>, pub agencies: Result<Vec<Agency>, Error>, pub shapes: Option<Result<Vec<Shape>, Error>>, pub fare_attributes: Option<Result<Vec<FareAttribute>, Error>>, pub frequencies: Option<Result<Vec<RawFrequency>, Error>>, pub transfers: Option<Result<Vec<RawTransfer>, Error>>, pub pathways: Option<Result<Vec<RawPathway>, Error>>, pub feed_info: Option<Result<Vec<FeedInfo>, Error>>, pub stop_times: Result<Vec<RawStopTime>, Error>, pub files: Vec<String>, pub sha256: Option<String>,
}
Expand description

Data structure that map the GTFS csv with little intelligence

This is used to analyze the GTFS and detect anomalies To manipulate the transit data, maybe crate::Gtfs will be more convienient

Fields§

§read_duration: i64

Time needed to read and parse the archive in milliseconds

§calendar: Option<Result<Vec<Calendar>, Error>>

All Calendar, None if the file was absent as it is not mandatory

§calendar_dates: Option<Result<Vec<CalendarDate>, Error>>

All Calendar dates, None if the file was absent as it is not mandatory

§stops: Result<Vec<Stop>, Error>

All Stops

§routes: Result<Vec<Route>, Error>

All Routes

§trips: Result<Vec<RawTrip>, Error>

All Trips

§agencies: Result<Vec<Agency>, Error>

All Agencies

§shapes: Option<Result<Vec<Shape>, Error>>

All shapes points, None if the file was absent as it is not mandatory

§fare_attributes: Option<Result<Vec<FareAttribute>, Error>>

All FareAttribates, None if the file was absent as it is not mandatory

§frequencies: Option<Result<Vec<RawFrequency>, Error>>

All Frequencies, None if the file was absent as it is not mandatory

§transfers: Option<Result<Vec<RawTransfer>, Error>>

All Transfers, None if the file was absent as it is not mandatory

§pathways: Option<Result<Vec<RawPathway>, Error>>

All Pathways, None if the file was absent as it is not mandatory

§feed_info: Option<Result<Vec<FeedInfo>, Error>>

All FeedInfo, None if the file was absent as it is not mandatory

§stop_times: Result<Vec<RawStopTime>, Error>

All StopTimes

§files: Vec<String>

All files that are present in the feed

§sha256: Option<String>

sha256 sum of the feed

Implementations§

Prints on stdout some basic statistics about the GTFS file (numbers of elements for each object). Mostly to be sure that everything was read

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 RawGtfs::from_url and RawGtfs::from_path if you don’t want the library to guess

 Reads the raw GTFS from a local zip archive or local directory

Reads the raw GTFS from a remote url

The library must be built with the read-url feature

Non-blocking read the raw GTFS from a remote url

The library must be built with the read-url feature

Reads for any object implementing std::io::Read and std::io::Seek

Mostly an internal function that abstracts reading from an url or local file

Trait Implementations§

Formats the value using the given formatter. Read more

Tries to build a Gtfs from a RawGtfs

It might fail if some mandatory files couldn’t be read or if there are references to other objects that are invalid.

The type returned in the event of a conversion error.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more