pub struct GTFSFareAttribute {
pub fare_id: String,
pub price: f64,
pub currency_type: String,
pub payment_method: i8,
pub transfers: String,
pub agency_id: Option<String>,
pub transfer_duration: Option<i32>,
}Expand description
§Fare Attributes (GTFS-Fares V1)
Optional - But required if using GTFS-Fares V1 approach. Defines basic fare information such as price, currency, and transfer limits.
Fields§
§fare_id: StringRequired Identifies a fare class.
price: f64Required
Fare price in the currency specified by currencyType.
currency_type: StringRequired Currency code (e.g., “USD”, “EUR”).
payment_method: i8Required When the fare must be paid.
- 0 = Paid on board
- 1 = Must be paid before boarding
transfers: StringRequired Number of transfers permitted on this fare.
- 0 = No transfers
- 1 = One transfer
- 2 = Two transfers
- ‘’ (empty) = Unlimited transfers
agency_id: Option<String>Conditionally Required
Agency for the specified fare.
Required if multiple agencies exist in agency.txt.
transfer_duration: Option<i32>Optional Length of time in seconds before a transfer (or this fare) expires. When transfers=0, may indicate ticket validity duration or be empty.
Implementations§
Source§impl GTFSFareAttribute
impl GTFSFareAttribute
Sourcepub fn payment_method(&self) -> GTFSPaymentMethod
pub fn payment_method(&self) -> GTFSPaymentMethod
Get the payment type
Sourcepub fn transfers(&self) -> GTFSTransfersType
pub fn transfers(&self) -> GTFSTransfersType
Get the transfers type
Trait Implementations§
Source§impl Clone for GTFSFareAttribute
impl Clone for GTFSFareAttribute
Source§fn clone(&self) -> GTFSFareAttribute
fn clone(&self) -> GTFSFareAttribute
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GTFSFareAttribute
impl Debug for GTFSFareAttribute
Source§impl Default for GTFSFareAttribute
impl Default for GTFSFareAttribute
Source§fn default() -> GTFSFareAttribute
fn default() -> GTFSFareAttribute
Source§impl From<&Map<String, ValueType>> for GTFSFareAttribute
Starting from a ref to an MValue, convert to a struct
impl From<&Map<String, ValueType>> for GTFSFareAttribute
Starting from a ref to an MValue, convert to a struct
Source§impl From<&ValueType> for GTFSFareAttribute
If this struct ref is nested into another struct, pull out the MValue and let
From handle
impl From<&ValueType> for GTFSFareAttribute
If this struct ref is nested into another struct, pull out the MValue and let
From
Source§impl From<GTFSFareAttribute> for MValue
Starting from a struct, convert to an MValue
impl From<GTFSFareAttribute> for MValue
Starting from a struct, convert to an MValue
Source§fn from(value: GTFSFareAttribute) -> MValue
fn from(value: GTFSFareAttribute) -> MValue
Source§impl From<GTFSFareAttribute> for ValueType
If this struct is nested into another struct, convert to a ValueType that’s nested
impl From<GTFSFareAttribute> for ValueType
If this struct is nested into another struct, convert to a ValueType that’s nested
Source§fn from(value: GTFSFareAttribute) -> ValueType
fn from(value: GTFSFareAttribute) -> ValueType
Source§impl From<Map<String, ValueType>> for GTFSFareAttribute
Starting from an MValue, convert to a struct
impl From<Map<String, ValueType>> for GTFSFareAttribute
Starting from an MValue, convert to a struct
Source§impl From<ValueType> for GTFSFareAttribute
If this struct is nested into another struct, pull out the MValue and let
From handle
impl From<ValueType> for GTFSFareAttribute
If this struct is nested into another struct, pull out the MValue and let
From
Source§impl PartialEq for GTFSFareAttribute
impl PartialEq for GTFSFareAttribute
impl MValueCompatible for GTFSFareAttribute
Finally implement the MValueCompatible trait
impl StructuralPartialEq for GTFSFareAttribute
Auto Trait Implementations§
impl Freeze for GTFSFareAttribute
impl RefUnwindSafe for GTFSFareAttribute
impl Send for GTFSFareAttribute
impl Sync for GTFSFareAttribute
impl Unpin for GTFSFareAttribute
impl UnwindSafe for GTFSFareAttribute
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().