Struct gtfs_rt::FeedEntity
source · 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 Message for FeedEntity
impl Message for FeedEntity
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 FeedEntity
impl PartialEq for FeedEntity
source§fn eq(&self, other: &FeedEntity) -> bool
fn eq(&self, other: &FeedEntity) -> bool
self
and other
values to be equal, and is used
by ==
.