pub struct GTFSFareRule {
pub fare_id: String,
pub route_id: Option<String>,
pub origin_id: Option<String>,
pub destination_id: Option<String>,
pub contains_id: Option<String>,
}Expand description
§Fare Rules
Optional
Defines how fares in fare_attributes.txt apply to an itinerary.
For more complex fare structures, multiple combinations of fields
(route, origin, destination, zones) can be used.
Fields§
§fare_id: StringRequired
Identifies a fare class (fare_attributes.fare_id).
route_id: Option<String>Optional
Route associated with this fare. If multiple routes share the same fare,
add multiple records in fare_rules.txt.
origin_id: Option<String>Optional
Origin zone (stops.zone_id). If a fare class applies to multiple origin zones,
each zone requires its own record.
destination_id: Option<String>Optional
Destination zone (stops.zone_id). If a fare class applies to multiple destination zones,
each zone requires its own record.
contains_id: Option<String>Optional All zones traveled during the trip using this fare class. If multiple zones must be passed, each is listed separately.
Implementations§
Source§impl GTFSFareRule
impl GTFSFareRule
Sourcepub fn new(source: &str) -> Vec<GTFSFareRule>
pub fn new(source: &str) -> Vec<GTFSFareRule>
Create a new GTFSFareRule
Trait Implementations§
Source§impl Clone for GTFSFareRule
impl Clone for GTFSFareRule
Source§fn clone(&self) -> GTFSFareRule
fn clone(&self) -> GTFSFareRule
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GTFSFareRule
impl Debug for GTFSFareRule
Source§impl Default for GTFSFareRule
impl Default for GTFSFareRule
Source§fn default() -> GTFSFareRule
fn default() -> GTFSFareRule
Source§impl From<&Map<String, ValueType>> for GTFSFareRule
Starting from a ref to an MValue, convert to a struct
impl From<&Map<String, ValueType>> for GTFSFareRule
Starting from a ref to an MValue, convert to a struct
Source§impl From<&ValueType> for GTFSFareRule
If this struct ref is nested into another struct, pull out the MValue and let
From handle
impl From<&ValueType> for GTFSFareRule
If this struct ref is nested into another struct, pull out the MValue and let
From
Source§impl From<GTFSFareRule> for MValue
Starting from a struct, convert to an MValue
impl From<GTFSFareRule> for MValue
Starting from a struct, convert to an MValue
Source§fn from(value: GTFSFareRule) -> MValue
fn from(value: GTFSFareRule) -> MValue
Source§impl From<GTFSFareRule> for ValueType
If this struct is nested into another struct, convert to a ValueType that’s nested
impl From<GTFSFareRule> for ValueType
If this struct is nested into another struct, convert to a ValueType that’s nested
Source§fn from(value: GTFSFareRule) -> ValueType
fn from(value: GTFSFareRule) -> ValueType
Source§impl From<Map<String, ValueType>> for GTFSFareRule
Starting from an MValue, convert to a struct
impl From<Map<String, ValueType>> for GTFSFareRule
Starting from an MValue, convert to a struct
Source§impl From<ValueType> for GTFSFareRule
If this struct is nested into another struct, pull out the MValue and let
From handle
impl From<ValueType> for GTFSFareRule
If this struct is nested into another struct, pull out the MValue and let
From
Source§impl PartialEq for GTFSFareRule
impl PartialEq for GTFSFareRule
impl MValueCompatible for GTFSFareRule
Finally implement the MValueCompatible trait
impl StructuralPartialEq for GTFSFareRule
Auto Trait Implementations§
impl Freeze for GTFSFareRule
impl RefUnwindSafe for GTFSFareRule
impl Send for GTFSFareRule
impl Sync for GTFSFareRule
impl Unpin for GTFSFareRule
impl UnwindSafe for GTFSFareRule
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().