Struct gtfs_rt::trip_update::StopTimeUpdate
source · pub struct StopTimeUpdate {
pub stop_sequence: Option<u32>,
pub stop_id: Option<String>,
pub arrival: Option<StopTimeEvent>,
pub departure: Option<StopTimeEvent>,
pub schedule_relationship: Option<i32>,
}
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>
§schedule_relationship: Option<i32>
Implementations§
source§impl StopTimeUpdate
impl StopTimeUpdate
pub fn stop_sequence(&self) -> u32
pub fn stop_id(&self) -> &str
pub fn schedule_relationship(&self) -> ScheduleRelationship
pub fn set_schedule_relationship(&mut self, value: ScheduleRelationship)
Trait Implementations§
source§impl Clone for StopTimeUpdate
impl Clone for StopTimeUpdate
source§fn clone(&self) -> StopTimeUpdate
fn clone(&self) -> StopTimeUpdate
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for StopTimeUpdate
impl Debug for StopTimeUpdate
source§impl Default for StopTimeUpdate
impl Default for StopTimeUpdate
source§fn default() -> StopTimeUpdate
fn default() -> StopTimeUpdate
Returns the “default value” for a type. Read more
source§impl Message for StopTimeUpdate
impl Message for StopTimeUpdate
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
Encodes the message to a buffer. Read more
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: IntoBuf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: IntoBuf,
Self: Default,
Decodes an instance of the message from a buffer. Read more
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: IntoBuf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: IntoBuf,
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: IntoBuf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: IntoBuf,
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self
. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: IntoBuf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: IntoBuf,
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
. Read more