pub struct FeedEntity {
pub id: String,
pub is_deleted: Option<bool>,
pub trip_update: Option<TripUpdate>,
pub vehicle: Option<VehiclePosition>,
pub alert: Option<Alert>,
pub shape: Option<Shape>,
pub stop: Option<Stop>,
pub trip_modifications: Option<TripModifications>,
}
Expand description
A definition (or update) of an entity in the transit feed.
Fields§
§id: String
The ids are used only to provide incrementality support. The id should be unique within a FeedMessage. Consequent FeedMessages may contain FeedEntities with the same id. In case of a DIFFERENTIAL update the new FeedEntity with some id will replace the old FeedEntity with the same id (or delete it - see is_deleted below). The actual GTFS entities (e.g. stations, routes, trips) referenced by the feed must be specified by explicit selectors (see EntitySelector below for more info).
is_deleted: Option<bool>
Whether this entity is to be deleted. Relevant only for incremental fetches.
trip_update: Option<TripUpdate>
Data about the entity itself. Exactly one of the following fields must be present (unless the entity is being deleted).
vehicle: Option<VehiclePosition>
§alert: Option<Alert>
§shape: Option<Shape>
NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
stop: Option<Stop>
§trip_modifications: Option<TripModifications>
Implementations§
Source§impl FeedEntity
impl FeedEntity
Sourcepub fn is_deleted(&self) -> bool
pub fn is_deleted(&self) -> bool
Returns the value of is_deleted
, or the default value if is_deleted
is unset.
Trait Implementations§
Source§impl Clone for FeedEntity
impl Clone for FeedEntity
Source§fn clone(&self) -> FeedEntity
fn clone(&self) -> FeedEntity
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for FeedEntity
impl Debug for FeedEntity
Source§impl Default for FeedEntity
impl Default for FeedEntity
Source§impl<'de> Deserialize<'de> for FeedEntity
impl<'de> Deserialize<'de> for FeedEntity
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 Message for FeedEntity
impl Message for FeedEntity
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
.