pub struct GTFSFareLegJoinRule {
pub from_network_id: String,
pub to_network_id: String,
pub from_stop_id: Option<String>,
pub to_stop_id: Option<String>,
}Expand description
§Fare Leg Join Rules
Optional
Defines when two consecutive legs with a transfer should be considered as
a single “effective fare leg” for the purpose of matching rules in fare_leg_rules.txt.
Primary Key: (from_network_id, to_network_id, from_stop_id, to_stop_id)
Matching Logic:
- If both
from_network_idandto_network_idmatch consecutive legs’ networks, andfrom_stop_id/to_stop_idmatch station or stop IDs for the transfer, those two legs merge into one effective leg. - If a field is empty, that field is ignored for matching.
- Consecutive transfers that each match a join rule merge the entire sub-journey into a single effective fare leg.
Fields§
§from_network_id: StringRequired
Matches the pre-transfer leg’s route network (routes.network_id or networks.network_id).
Must be specified alongside toNetworkId.
to_network_id: StringRequired
Matches the post-transfer leg’s route network (routes.network_id or networks.network_id).
Must be specified alongside fromNetworkId.
from_stop_id: Option<String>Conditionally Required
Matches the pre-transfer leg’s ending stop/station (stops.stop_id).
Required if toStopId is defined; optional otherwise.
to_stop_id: Option<String>Conditionally Required
Matches the post-transfer leg’s starting stop/station (stops.stop_id).
Required if fromStopId is defined; optional otherwise.
Implementations§
Source§impl GTFSFareLegJoinRule
impl GTFSFareLegJoinRule
Sourcepub fn new(source: &str) -> Vec<GTFSFareLegJoinRule>
pub fn new(source: &str) -> Vec<GTFSFareLegJoinRule>
Create a new GTFSFareLegJoinRule
Trait Implementations§
Source§impl Clone for GTFSFareLegJoinRule
impl Clone for GTFSFareLegJoinRule
Source§fn clone(&self) -> GTFSFareLegJoinRule
fn clone(&self) -> GTFSFareLegJoinRule
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GTFSFareLegJoinRule
impl Debug for GTFSFareLegJoinRule
Source§impl Default for GTFSFareLegJoinRule
impl Default for GTFSFareLegJoinRule
Source§fn default() -> GTFSFareLegJoinRule
fn default() -> GTFSFareLegJoinRule
Source§impl From<&Map<String, ValueType>> for GTFSFareLegJoinRule
Starting from a ref to an MValue, convert to a struct
impl From<&Map<String, ValueType>> for GTFSFareLegJoinRule
Starting from a ref to an MValue, convert to a struct
Source§impl From<&ValueType> for GTFSFareLegJoinRule
If this struct ref is nested into another struct, pull out the MValue and let
From handle
impl From<&ValueType> for GTFSFareLegJoinRule
If this struct ref is nested into another struct, pull out the MValue and let
From
Source§impl From<GTFSFareLegJoinRule> for MValue
Starting from a struct, convert to an MValue
impl From<GTFSFareLegJoinRule> for MValue
Starting from a struct, convert to an MValue
Source§fn from(value: GTFSFareLegJoinRule) -> MValue
fn from(value: GTFSFareLegJoinRule) -> MValue
Source§impl From<GTFSFareLegJoinRule> for ValueType
If this struct is nested into another struct, convert to a ValueType that’s nested
impl From<GTFSFareLegJoinRule> for ValueType
If this struct is nested into another struct, convert to a ValueType that’s nested
Source§fn from(value: GTFSFareLegJoinRule) -> ValueType
fn from(value: GTFSFareLegJoinRule) -> ValueType
Source§impl From<Map<String, ValueType>> for GTFSFareLegJoinRule
Starting from an MValue, convert to a struct
impl From<Map<String, ValueType>> for GTFSFareLegJoinRule
Starting from an MValue, convert to a struct
Source§impl From<ValueType> for GTFSFareLegJoinRule
If this struct is nested into another struct, pull out the MValue and let
From handle
impl From<ValueType> for GTFSFareLegJoinRule
If this struct is nested into another struct, pull out the MValue and let
From
Source§impl PartialEq for GTFSFareLegJoinRule
impl PartialEq for GTFSFareLegJoinRule
impl MValueCompatible for GTFSFareLegJoinRule
Finally implement the MValueCompatible trait
impl StructuralPartialEq for GTFSFareLegJoinRule
Auto Trait Implementations§
impl Freeze for GTFSFareLegJoinRule
impl RefUnwindSafe for GTFSFareLegJoinRule
impl Send for GTFSFareLegJoinRule
impl Sync for GTFSFareLegJoinRule
impl Unpin for GTFSFareLegJoinRule
impl UnwindSafe for GTFSFareLegJoinRule
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().