pub struct GTFSTranslation {
pub table_name: String,
pub field_name: String,
pub language: String,
pub translation: String,
pub record_id: Option<String>,
pub record_sub_id: Option<String>,
pub field_value: Option<String>,
}Expand description
§Translations
Optional Provides language-specific translations for text fields in various GTFS tables. Each row defines a single translation for a specific field in a specific language, either targeting a specific record (and possibly sub-record) or matching by field value.
Primary Key: (table_name, field_name, language, record_id, record_sub_id, field_value)
Fields§
§table_name: StringRequired The table containing the field to be translated.
Allowed values (official spec):
- “agency”
- “stops”
- “routes”
- “trips”
- “stop_times”
- “pathways”
- “levels”
- “feed_info”
- “attributions”
Other optional files (calendar, shapes, etc.) may appear for unofficial field translations.
field_name: StringRequired Name of the field within the table that is being translated. Typically text, URL, phone, or email fields.
language: StringRequired ISO language code (e.g., “en”, “fr”, “mul”) for this translation.
translation: StringRequired The translated value, matching the type of the original field (text, URL, phone, email).
record_id: Option<String>Conditionally Required
Identifies the primary key of the record in the table if the table has a unique ID
(e.g., agency_id, stop_id, route_id, trip_id, pathway_id, level_id, attribution_id).
Required unless fieldValue is used or if tableName=feed_info.
record_sub_id: Option<String>Conditionally Required
Secondary key if the table doesn’t have a single unique ID (e.g., stop_sequence for stop_times).
Required if recordId is used and tableName=stop_times. Forbidden otherwise.
field_value: Option<String>Conditionally Required
The exact field value to match for translation if recordId and recordSubId are not used.
Forbidden if recordId is defined or if tableName=feed_info.
Implementations§
Source§impl GTFSTranslation
impl GTFSTranslation
Sourcepub fn new(source: &str) -> Vec<GTFSTranslation>
pub fn new(source: &str) -> Vec<GTFSTranslation>
Create a new GTFSTranslation
Trait Implementations§
Source§impl Clone for GTFSTranslation
impl Clone for GTFSTranslation
Source§fn clone(&self) -> GTFSTranslation
fn clone(&self) -> GTFSTranslation
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GTFSTranslation
impl Debug for GTFSTranslation
Source§impl Default for GTFSTranslation
impl Default for GTFSTranslation
Source§fn default() -> GTFSTranslation
fn default() -> GTFSTranslation
Source§impl From<&Map<String, ValueType>> for GTFSTranslation
Starting from a ref to an MValue, convert to a struct
impl From<&Map<String, ValueType>> for GTFSTranslation
Starting from a ref to an MValue, convert to a struct
Source§impl From<&ValueType> for GTFSTranslation
If this struct ref is nested into another struct, pull out the MValue and let
From handle
impl From<&ValueType> for GTFSTranslation
If this struct ref is nested into another struct, pull out the MValue and let
From
Source§impl From<GTFSTranslation> for MValue
Starting from a struct, convert to an MValue
impl From<GTFSTranslation> for MValue
Starting from a struct, convert to an MValue
Source§fn from(value: GTFSTranslation) -> MValue
fn from(value: GTFSTranslation) -> MValue
Source§impl From<GTFSTranslation> for ValueType
If this struct is nested into another struct, convert to a ValueType that’s nested
impl From<GTFSTranslation> for ValueType
If this struct is nested into another struct, convert to a ValueType that’s nested
Source§fn from(value: GTFSTranslation) -> ValueType
fn from(value: GTFSTranslation) -> ValueType
Source§impl From<Map<String, ValueType>> for GTFSTranslation
Starting from an MValue, convert to a struct
impl From<Map<String, ValueType>> for GTFSTranslation
Starting from an MValue, convert to a struct
Source§impl From<ValueType> for GTFSTranslation
If this struct is nested into another struct, pull out the MValue and let
From handle
impl From<ValueType> for GTFSTranslation
If this struct is nested into another struct, pull out the MValue and let
From
Source§impl PartialEq for GTFSTranslation
impl PartialEq for GTFSTranslation
impl MValueCompatible for GTFSTranslation
Finally implement the MValueCompatible trait
impl StructuralPartialEq for GTFSTranslation
Auto Trait Implementations§
impl Freeze for GTFSTranslation
impl RefUnwindSafe for GTFSTranslation
impl Send for GTFSTranslation
impl Sync for GTFSTranslation
impl Unpin for GTFSTranslation
impl UnwindSafe for GTFSTranslation
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().