pub struct StopTimeUpdate {
pub stop_sequence: Option<u32>,
pub stop_id: Option<String>,
pub arrival: Option<StopTimeEvent>,
pub departure: Option<StopTimeEvent>,
pub departure_occupancy_status: Option<i32>,
pub schedule_relationship: Option<i32>,
pub stop_time_properties: Option<StopTimeProperties>,
}Expand description
Realtime update for arrival and/or departure events for a given stop on a trip. Updates can be supplied for both past and future events. The producer is allowed, although not required, to drop past events.
The update is linked to a specific stop either through stop_sequence or stop_id, so one of the fields below must necessarily be set. See the documentation in TripDescriptor for more information.
Fields§
§stop_sequence: Option<u32>Must be the same as in stop_times.txt in the corresponding GTFS feed.
stop_id: Option<String>Must be the same as in stops.txt in the corresponding GTFS feed.
arrival: Option<StopTimeEvent>§departure: Option<StopTimeEvent>§departure_occupancy_status: Option<i32>Expected occupancy after departure from the given stop. Should be provided only for future stops. In order to provide departure_occupancy_status without either arrival or departure StopTimeEvents, ScheduleRelationship should be set to NO_DATA.
schedule_relationship: Option<i32>§stop_time_properties: Option<StopTimeProperties>Realtime updates for certain properties defined within GTFS stop_times.txt NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
Implementations§
Source§impl StopTimeUpdate
impl StopTimeUpdate
Sourcepub fn stop_sequence(&self) -> u32
pub fn stop_sequence(&self) -> u32
Returns the value of stop_sequence, or the default value if stop_sequence is unset.
Sourcepub fn stop_id(&self) -> &str
pub fn stop_id(&self) -> &str
Returns the value of stop_id, or the default value if stop_id is unset.
Sourcepub fn schedule_relationship(&self) -> ScheduleRelationship
pub fn schedule_relationship(&self) -> ScheduleRelationship
Returns the enum value of schedule_relationship, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_schedule_relationship(&mut self, value: ScheduleRelationship)
pub fn set_schedule_relationship(&mut self, value: ScheduleRelationship)
Sets schedule_relationship to the provided enum value.
Sourcepub fn departure_occupancy_status(&self) -> OccupancyStatus
pub fn departure_occupancy_status(&self) -> OccupancyStatus
Returns the enum value of departure_occupancy_status, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_departure_occupancy_status(&mut self, value: OccupancyStatus)
pub fn set_departure_occupancy_status(&mut self, value: OccupancyStatus)
Sets departure_occupancy_status to the provided enum value.
Trait Implementations§
Source§impl Clone for StopTimeUpdate
impl Clone for StopTimeUpdate
Source§fn clone(&self) -> StopTimeUpdate
fn clone(&self) -> StopTimeUpdate
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StopTimeUpdate
impl Debug for StopTimeUpdate
Source§impl Default for StopTimeUpdate
impl Default for StopTimeUpdate
Source§impl<'de> Deserialize<'de> for StopTimeUpdate
impl<'de> Deserialize<'de> for StopTimeUpdate
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for StopTimeUpdate
impl Hash for StopTimeUpdate
Source§impl Message for StopTimeUpdate
impl Message for StopTimeUpdate
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.