pub struct GTFSFareProduct {
pub fare_product_id: String,
pub fare_product_name: Option<String>,
pub rider_category_id: Option<String>,
pub fare_media_id: Option<String>,
pub amount: f64,
pub currency: String,
}Expand description
§Fare Products
Optional Describes different fare products riders can purchase. Used by GTFS-Fares V2 to model fare product costs, media, and potential discounts for multi-leg journeys.
Multiple rows with the same fare_product_id can exist, each paired with a different fare_media_id.
Fields§
§fare_product_id: StringRequired Identifies a fare product or set of fare products.
fare_product_name: Option<String>Optional The name of the fare product as displayed to riders.
rider_category_id: Option<String>Optional Identifies a rider category eligible for the fare product.
If fare_products.rider_category_id is empty, the fare product is eligible for any rider_category_id.
When multiple rider categories are eligible for a single fare product specified by a fare_product_id, there must be only one of these rider categories indicated as the default rider category (is_default_fare_category = 1).
fare_media_id: Option<String>Optional
Identifies a fare media (fare_media.fare_media_id) that can be employed to use this fare product.
When empty, the fare media is unknown.
amount: f64Required The cost of the fare product. May be:
- Negative: Transfer discount
- Zero: Free fare
- Positive: Standard fare cost
currency: StringRequired Currency code (e.g., “USD”, “EUR”) for the cost of this product.
Implementations§
Trait Implementations§
Source§impl Clone for GTFSFareProduct
impl Clone for GTFSFareProduct
Source§fn clone(&self) -> GTFSFareProduct
fn clone(&self) -> GTFSFareProduct
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GTFSFareProduct
impl Debug for GTFSFareProduct
Source§impl Default for GTFSFareProduct
impl Default for GTFSFareProduct
Source§fn default() -> GTFSFareProduct
fn default() -> GTFSFareProduct
Source§impl From<&Map<String, ValueType>> for GTFSFareProduct
Starting from a ref to an MValue, convert to a struct
impl From<&Map<String, ValueType>> for GTFSFareProduct
Starting from a ref to an MValue, convert to a struct
Source§impl From<&ValueType> for GTFSFareProduct
If this struct ref is nested into another struct, pull out the MValue and let
From handle
impl From<&ValueType> for GTFSFareProduct
If this struct ref is nested into another struct, pull out the MValue and let
From
Source§impl From<GTFSFareProduct> for MValue
Starting from a struct, convert to an MValue
impl From<GTFSFareProduct> for MValue
Starting from a struct, convert to an MValue
Source§fn from(value: GTFSFareProduct) -> MValue
fn from(value: GTFSFareProduct) -> MValue
Source§impl From<GTFSFareProduct> for ValueType
If this struct is nested into another struct, convert to a ValueType that’s nested
impl From<GTFSFareProduct> for ValueType
If this struct is nested into another struct, convert to a ValueType that’s nested
Source§fn from(value: GTFSFareProduct) -> ValueType
fn from(value: GTFSFareProduct) -> ValueType
Source§impl From<Map<String, ValueType>> for GTFSFareProduct
Starting from an MValue, convert to a struct
impl From<Map<String, ValueType>> for GTFSFareProduct
Starting from an MValue, convert to a struct
Source§impl From<ValueType> for GTFSFareProduct
If this struct is nested into another struct, pull out the MValue and let
From handle
impl From<ValueType> for GTFSFareProduct
If this struct is nested into another struct, pull out the MValue and let
From
Source§impl PartialEq for GTFSFareProduct
impl PartialEq for GTFSFareProduct
impl MValueCompatible for GTFSFareProduct
Finally implement the MValueCompatible trait
impl StructuralPartialEq for GTFSFareProduct
Auto Trait Implementations§
impl Freeze for GTFSFareProduct
impl RefUnwindSafe for GTFSFareProduct
impl Send for GTFSFareProduct
impl Sync for GTFSFareProduct
impl Unpin for GTFSFareProduct
impl UnwindSafe for GTFSFareProduct
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().