pub struct GTFSRealtimeTripDescriptor {
pub trip_id: Option<String>,
pub start_time: Option<String>,
pub start_date: Option<Date>,
pub schedule_relationship: Option<GTFSRealtimeScheduleRelationship>,
pub route_id: Option<String>,
pub direction_id: Option<u32>,
pub modified_trip: Option<GTFSRealtimeModifiedTripSelector>,
}Expand description
A descriptor that identifies an instance of a GTFS trip, or all instances of a trip along a route.
- To specify a single trip instance, the trip_id (and if necessary, start_time) is set. If route_id is also set, then it should be same as one that the given trip corresponds to.
- To specify all the trips along a given route, only the route_id should be set. Note that if the trip_id is not known, then stop sequence ids in TripUpdate are not sufficient, and stop_ids must be provided as well. In addition, absolute arrival/departure times must be provided.
Fields§
§trip_id: Option<String>The trip_id from the GTFS feed that this selector refers to. For non frequency-based trips, this field is enough to uniquely identify the trip. For frequency-based trip, start_time and start_date might also be necessary. When schedule_relationship is DUPLICATED within a TripUpdate, the trip_id identifies the trip from static GTFS to be duplicated. When schedule_relationship is DUPLICATED within a VehiclePosition, the trip_id identifies the new duplicate trip and must contain the value for the corresponding TripUpdate.TripProperties.trip_id.
start_time: Option<String>The initially scheduled start time of this trip instance. When the trip_id corresponds to a non-frequency-based trip, this field should either be omitted or be equal to the value in the GTFS feed. When the trip_id correponds to a frequency-based trip, the start_time must be specified for trip updates and vehicle positions. If the trip corresponds to exact_times=1 GTFS record, then start_time must be some multiple (including zero) of headway_secs later than frequencies.txt start_time for the corresponding time period. If the trip corresponds to exact_times=0, then its start_time may be arbitrary, and is initially expected to be the first departure of the trip. Once established, the start_time of this frequency-based trip should be considered immutable, even if the first departure time changes – that time change may instead be reflected in a StopTimeUpdate. Format and semantics of the field is same as that of GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35.
start_date: Option<Date>The scheduled start date of this trip instance. Must be provided to disambiguate trips that are so late as to collide with a scheduled trip on a next day. For example, for a train that departs 8:00 and 20:00 every day, and is 12 hours late, there would be two distinct trips on the same time. This field can be provided but is not mandatory for schedules in which such collisions are impossible - for example, a service running on hourly schedule where a vehicle that is one hour late is not considered to be related to schedule anymore. In YYYYMMDD format.
schedule_relationship: Option<GTFSRealtimeScheduleRelationship>The relation between this trip and the static schedule. If a trip is done in accordance with temporary schedule, not reflected in GTFS, then it shouldn’t be marked as SCHEDULED, but likely as ADDED.
route_id: Option<String>The route_id from the GTFS that this selector refers to.
direction_id: Option<u32>The direction_id from the GTFS feed trips.txt file, indicating the direction of travel for trips this selector refers to.
modified_trip: Option<GTFSRealtimeModifiedTripSelector>Linkage to any modifications done to this trip (shape changes, removal or addition of stops).
If this field is provided, the trip_id, route_id, direction_id, start_time, start_date fields of the TripDescriptor MUST be left empty, to avoid confusion by consumers that aren’t looking for the ModifiedTripSelector value.
Trait Implementations§
Source§impl Clone for GTFSRealtimeTripDescriptor
impl Clone for GTFSRealtimeTripDescriptor
Source§fn clone(&self) -> GTFSRealtimeTripDescriptor
fn clone(&self) -> GTFSRealtimeTripDescriptor
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GTFSRealtimeTripDescriptor
impl Debug for GTFSRealtimeTripDescriptor
Source§impl Default for GTFSRealtimeTripDescriptor
impl Default for GTFSRealtimeTripDescriptor
Source§fn default() -> GTFSRealtimeTripDescriptor
fn default() -> GTFSRealtimeTripDescriptor
Source§impl ProtoRead for GTFSRealtimeTripDescriptor
Read in the contents of the GTFSRealtimeTripDescriptor
impl ProtoRead for GTFSRealtimeTripDescriptor
Read in the contents of the GTFSRealtimeTripDescriptor
impl StructuralPartialEq for GTFSRealtimeTripDescriptor
Auto Trait Implementations§
impl Freeze for GTFSRealtimeTripDescriptor
impl RefUnwindSafe for GTFSRealtimeTripDescriptor
impl Send for GTFSRealtimeTripDescriptor
impl Sync for GTFSRealtimeTripDescriptor
impl Unpin for GTFSRealtimeTripDescriptor
impl UnwindSafe for GTFSRealtimeTripDescriptor
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().