pub struct GTFSFareTransferRule {
pub from_leg_group_id: Option<String>,
pub to_leg_group_id: Option<String>,
pub transfer_count: Option<i32>,
pub duration_limit: Option<i32>,
pub duration_limit_type: Option<i8>,
pub fare_transfer_type: i8,
pub fare_product_id: Option<String>,
}Expand description
§Fare Transfer Rules
Optional
Defines the cost of transferring between fare legs specified in fare_leg_rules.txt.
Matching uses:
- from_leg_group_id
- to_leg_group_id
- transfer_count
- duration_limit
- duration_limit_type
- fare_transfer_type
- fare_product_id
Primary Key: (from_leg_group_id, to_leg_group_id, fare_product_id, transfer_count, duration_limit)
Fields§
§from_leg_group_id: Option<String>Optional
The pre-transfer fare leg group (fare_leg_rules.leg_group_id).
- If no exact match is found, empty corresponds to all leg groups not listed under
from_leg_group_id.
to_leg_group_id: Option<String>Optional
The post-transfer fare leg group (fare_leg_rules.leg_group_id).
- If no exact match is found, empty corresponds to all leg groups not listed under
to_leg_group_id.
transfer_count: Option<i32>Conditionally Forbidden / Required Defines how many consecutive transfers this rule may be applied to.
-1means no limit.1or more = the transfer count this rule applies to.
Forbidden if from_leg_group_id !== to_leg_group_id.
Required if from_leg_group_id === to_leg_group_id.
duration_limit: Option<i32>Optional Duration limit (in seconds) for the transfer. Empty means no limit.
duration_limit_type: Option<i8>Conditionally Required
Defines how to measure the durationLimit.
- Required if
durationLimitis defined. - Forbidden if
durationLimitis empty.
fare_transfer_type: i8Required Indicates how to combine transfer costs:
- 0 = from-leg cost + transfer cost
- 1 = from-leg + transfer + to-leg cost
- 2 = transfer cost only
fare_product_id: Option<String>Optional Fare product ID for the transfer. If empty, cost is 0 (no transfer cost).
Implementations§
Source§impl GTFSFareTransferRule
impl GTFSFareTransferRule
Sourcepub fn new(source: &str) -> Vec<GTFSFareTransferRule>
pub fn new(source: &str) -> Vec<GTFSFareTransferRule>
Create a new GTFSFareTransferRule
Sourcepub fn duration_limit_type(&self) -> Option<GTFSDurationLimitType>
pub fn duration_limit_type(&self) -> Option<GTFSDurationLimitType>
Get the duration_limit_type
Sourcepub fn fare_transfer_type(&self) -> GTFSFareTransferType
pub fn fare_transfer_type(&self) -> GTFSFareTransferType
Get the fare_transfer_type
Trait Implementations§
Source§impl Clone for GTFSFareTransferRule
impl Clone for GTFSFareTransferRule
Source§fn clone(&self) -> GTFSFareTransferRule
fn clone(&self) -> GTFSFareTransferRule
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GTFSFareTransferRule
impl Debug for GTFSFareTransferRule
Source§impl Default for GTFSFareTransferRule
impl Default for GTFSFareTransferRule
Source§fn default() -> GTFSFareTransferRule
fn default() -> GTFSFareTransferRule
Source§impl From<&Map<String, ValueType>> for GTFSFareTransferRule
Starting from a ref to an MValue, convert to a struct
impl From<&Map<String, ValueType>> for GTFSFareTransferRule
Starting from a ref to an MValue, convert to a struct
Source§impl From<&ValueType> for GTFSFareTransferRule
If this struct ref is nested into another struct, pull out the MValue and let
From handle
impl From<&ValueType> for GTFSFareTransferRule
If this struct ref is nested into another struct, pull out the MValue and let
From
Source§impl From<GTFSFareTransferRule> for MValue
Starting from a struct, convert to an MValue
impl From<GTFSFareTransferRule> for MValue
Starting from a struct, convert to an MValue
Source§fn from(value: GTFSFareTransferRule) -> MValue
fn from(value: GTFSFareTransferRule) -> MValue
Source§impl From<GTFSFareTransferRule> for ValueType
If this struct is nested into another struct, convert to a ValueType that’s nested
impl From<GTFSFareTransferRule> for ValueType
If this struct is nested into another struct, convert to a ValueType that’s nested
Source§fn from(value: GTFSFareTransferRule) -> ValueType
fn from(value: GTFSFareTransferRule) -> ValueType
Source§impl From<Map<String, ValueType>> for GTFSFareTransferRule
Starting from an MValue, convert to a struct
impl From<Map<String, ValueType>> for GTFSFareTransferRule
Starting from an MValue, convert to a struct
Source§impl From<ValueType> for GTFSFareTransferRule
If this struct is nested into another struct, pull out the MValue and let
From handle
impl From<ValueType> for GTFSFareTransferRule
If this struct is nested into another struct, pull out the MValue and let
From
Source§impl PartialEq for GTFSFareTransferRule
impl PartialEq for GTFSFareTransferRule
impl MValueCompatible for GTFSFareTransferRule
Finally implement the MValueCompatible trait
impl StructuralPartialEq for GTFSFareTransferRule
Auto Trait Implementations§
impl Freeze for GTFSFareTransferRule
impl RefUnwindSafe for GTFSFareTransferRule
impl Send for GTFSFareTransferRule
impl Sync for GTFSFareTransferRule
impl Unpin for GTFSFareTransferRule
impl UnwindSafe for GTFSFareTransferRule
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().