#[repr(u8)]pub enum GTFSRealtimeScheduleRelationship {
Scheduled = 0,
Added = 1,
Unscheduled = 2,
Cancelled = 3,
Replacement = 5,
Duplicated = 6,
Deleted = 7,
}Expand description
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.
Variants§
Scheduled = 0
Trip that is running in accordance with its GTFS schedule, or is close enough to the scheduled trip to be associated with it.
Added = 1
An extra trip that was added in addition to a running schedule, for example, to replace a broken vehicle or to respond to sudden passenger load. NOTE: Currently, behavior is unspecified for feeds that use this mode. There are discussions on the GTFS GitHub (1) (2) (3) around fully specifying or deprecating ADDED trips and the documentation will be updated when those discussions are finalized.
Unscheduled = 2
A trip that is running with no schedule associated to it (GTFS frequencies.txt exact_times=0). Trips with ScheduleRelationship=UNSCHEDULED must also set all StopTimeUpdates.ScheduleRelationship=UNSCHEDULED.
Cancelled = 3
A trip that existed in the schedule but was removed.
Replacement = 5
Should not be used - for backwards-compatibility only.
Duplicated = 6
An extra trip that was added in addition to a running schedule, for example, to replace a broken vehicle or to respond to sudden passenger load. Used with TripUpdate.TripProperties.trip_id, TripUpdate.TripProperties.start_date, and TripUpdate.TripProperties.start_time to copy an existing trip from static GTFS but start at a different service date and/or time. Duplicating a trip is allowed if the service related to the original trip in (CSV) GTFS (in calendar.txt or calendar_dates.txt) is operating within the next 30 days. The trip to be duplicated is identified via TripUpdate.TripDescriptor.trip_id. This enumeration does not modify the existing trip referenced by TripUpdate.TripDescriptor.trip_id - if a producer wants to cancel the original trip, it must publish a separate TripUpdate with the value of CANCELED or DELETED. Trips defined in GTFS frequencies.txt with exact_times that is empty or equal to 0 cannot be duplicated. The VehiclePosition.TripDescriptor.trip_id for the new trip must contain the matching value from TripUpdate.TripProperties.trip_id and VehiclePosition.TripDescriptor.ScheduleRelationship must also be set to DUPLICATED. Existing producers and consumers that were using the ADDED enumeration to represent duplicated trips must follow the migration guide https://github.com/google/transit/tree/master/gtfs-realtime/spec/en/examples/migration-duplicated.md to transition to the DUPLICATED enumeration. NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
Deleted = 7
A trip that existed in the schedule but was removed and must not be shown to users. DELETED should be used instead of CANCELED to indicate that a transit provider would like to entirely remove information about the corresponding trip from consuming applications, so the trip is not shown as cancelled to riders, e.g. a trip that is entirely being replaced by another trip. This designation becomes particularly important if several trips are cancelled and replaced with substitute service. If consumers were to show explicit information about the cancellations it would distract from the more important real-time predictions. NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
Trait Implementations§
Source§impl Clone for GTFSRealtimeScheduleRelationship
impl Clone for GTFSRealtimeScheduleRelationship
Source§fn clone(&self) -> GTFSRealtimeScheduleRelationship
fn clone(&self) -> GTFSRealtimeScheduleRelationship
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for GTFSRealtimeScheduleRelationship
impl Default for GTFSRealtimeScheduleRelationship
Source§fn default() -> GTFSRealtimeScheduleRelationship
fn default() -> GTFSRealtimeScheduleRelationship
Source§impl Ord for GTFSRealtimeScheduleRelationship
impl Ord for GTFSRealtimeScheduleRelationship
Source§fn cmp(&self, other: >FSRealtimeScheduleRelationship) -> Ordering
fn cmp(&self, other: >FSRealtimeScheduleRelationship) -> Ordering
1.21.0§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for GTFSRealtimeScheduleRelationship
impl PartialOrd for GTFSRealtimeScheduleRelationship
impl Copy for GTFSRealtimeScheduleRelationship
impl Eq for GTFSRealtimeScheduleRelationship
impl StructuralPartialEq for GTFSRealtimeScheduleRelationship
Auto Trait Implementations§
impl Freeze for GTFSRealtimeScheduleRelationship
impl RefUnwindSafe for GTFSRealtimeScheduleRelationship
impl Send for GTFSRealtimeScheduleRelationship
impl Sync for GTFSRealtimeScheduleRelationship
impl Unpin for GTFSRealtimeScheduleRelationship
impl UnwindSafe for GTFSRealtimeScheduleRelationship
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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().