pub struct TransitCostingOptions { /* private fields */ }Expand description
Transit costing options
Implementations§
Source§impl TransitCostingOptions
impl TransitCostingOptions
Sourcepub fn builder() -> Self
pub fn builder() -> Self
Builder for TransitCostingOptions
Sourcepub fn use_bus(self, use_bus: f32) -> Self
pub fn use_bus(self, use_bus: f32) -> Self
User’s desire to use buses.
Range of values from
0(try to avoid buses) to1(strong preference for riding buses).
Sourcepub fn use_rail(self, use_rail: f32) -> Self
pub fn use_rail(self, use_rail: f32) -> Self
User’s desire to use rail/subway/metro.
Range of values from
0(try to avoid rail) to1(strong preference for riding rail).
Sourcepub fn use_transfers(self, use_transfers: f32) -> Self
pub fn use_transfers(self, use_transfers: f32) -> Self
User’s desire to favor transfers.
Range of values from
0(try to avoid transfers) to1(totally comfortable with transfers).
Sourcepub fn filter_routes<S>(
self,
ids: impl IntoIterator<Item = S>,
action: Action,
) -> Self
pub fn filter_routes<S>( self, ids: impl IntoIterator<Item = S>, action: Action, ) -> Self
Sets a filter for one or more routes
Filters must contain a list of so-called Onestop IDs, which is (supposed to be) a
unique identifier for GTFS data, and an Action.
The OneStop ID is simply the feeds’s directory name and the object’s GTFS ID separated
by an underscore.
Example:
A route with route_id: AUR in routes.txt from the feed NYC would have
the OneStop ID NYC_AUR, similar with operators/agencies
Tip: Can be combined with Self::filter_stops and/or Self::filter_operators
Sourcepub fn filter_operators<S>(
self,
ids: impl IntoIterator<Item = S>,
action: Action,
) -> Self
pub fn filter_operators<S>( self, ids: impl IntoIterator<Item = S>, action: Action, ) -> Self
Sets a filter for one or more operators.
Filters must contain a list of so-called Onestop IDs, which is (supposed to be) a
unique identifier for GTFS data, and an Action.
The OneStop ID is simply the feeds’s directory name and the object’s GTFS ID separated
by an underscore.
Example:
A route with route_id: AUR in routes.txt from the feed NYC would have
the OneStop ID NYC_AUR, similar with operators/agencies
Tip: Can be combined with Self::filter_stops and/or Self::filter_routes
Trait Implementations§
Source§impl Clone for TransitCostingOptions
impl Clone for TransitCostingOptions
Source§fn clone(&self) -> TransitCostingOptions
fn clone(&self) -> TransitCostingOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more