pub struct Modification {
pub start_stop_selector: Option<StopSelector>,
pub end_stop_selector: Option<StopSelector>,
pub propagated_modification_delay: Option<i32>,
pub replacement_stops: Vec<ReplacementStop>,
pub service_alert_id: Option<String>,
pub last_modified_time: Option<u64>,
}Expand description
A Modification message replaces a span of n stop times from each affected trip starting at start_stop_selector.
Fields§
§start_stop_selector: Option<StopSelector>The stop selector of the first stop_time of the original trip that is to be affected by this modification.
Used in conjuction with end_stop_selector.
start_stop_selector is required and is used to define the reference stop used with travel_time_to_stop.
end_stop_selector: Option<StopSelector>The stop selector of the last stop of the original trip that is to be affected by this modification.
The selection is inclusive, so if only one stop_time is replaced by that modification, start_stop_selector and end_stop_selector must be equivalent.
If no stop_time is replaced, end_stop_selector must not be provided. It’s otherwise required.
propagated_modification_delay: Option<i32>The number of seconds of delay to add to all departure and arrival times following the end of this modification. If multiple modifications apply to the same trip, the delays accumulate as the trip advances.
replacement_stops: Vec<ReplacementStop>A list of replacement stops, replacing those of the original trip. The length of the new stop times may be less, the same, or greater than the number of replaced stop times.
service_alert_id: Option<String>An id value from the FeedEntity message that contains the Alert describing this Modification for user-facing communication.
last_modified_time: Option<u64>This timestamp identifies the moment when the modification has last been changed. In POSIX time (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
Implementations§
Source§impl Modification
impl Modification
Sourcepub fn propagated_modification_delay(&self) -> i32
pub fn propagated_modification_delay(&self) -> i32
Returns the value of propagated_modification_delay, or the default value if propagated_modification_delay is unset.
Sourcepub fn service_alert_id(&self) -> &str
pub fn service_alert_id(&self) -> &str
Returns the value of service_alert_id, or the default value if service_alert_id is unset.
Sourcepub fn last_modified_time(&self) -> u64
pub fn last_modified_time(&self) -> u64
Returns the value of last_modified_time, or the default value if last_modified_time is unset.
Trait Implementations§
Source§impl Clone for Modification
impl Clone for Modification
Source§fn clone(&self) -> Modification
fn clone(&self) -> Modification
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Modification
impl Debug for Modification
Source§impl Default for Modification
impl Default for Modification
Source§impl Message for Modification
impl Message for Modification
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
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<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
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<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self.Source§impl PartialEq for Modification
impl PartialEq for Modification
Source§fn eq(&self, other: &Modification) -> bool
fn eq(&self, other: &Modification) -> bool
self and other values to be equal, and is used by ==.