Struct gtfs_rt::EntitySelector
source · pub struct EntitySelector {
pub agency_id: Option<String>,
pub route_id: Option<String>,
pub route_type: Option<i32>,
pub trip: Option<TripDescriptor>,
pub stop_id: Option<String>,
pub direction_id: Option<u32>,
}
Expand description
A selector for an entity in a GTFS feed.
Fields§
§agency_id: Option<String>
The values of the fields should correspond to the appropriate fields in the GTFS feed. At least one specifier must be given. If several are given, then the matching has to apply to all the given specifiers.
route_id: Option<String>
§route_type: Option<i32>
corresponds to route_type in GTFS.
trip: Option<TripDescriptor>
§stop_id: Option<String>
§direction_id: Option<u32>
Corresponds to trip direction_id in GTFS trips.txt. If provided the route_id must also be provided.
Implementations§
source§impl EntitySelector
impl EntitySelector
sourcepub fn agency_id(&self) -> &str
pub fn agency_id(&self) -> &str
Returns the value of agency_id
, or the default value if agency_id
is unset.
sourcepub fn route_id(&self) -> &str
pub fn route_id(&self) -> &str
Returns the value of route_id
, or the default value if route_id
is unset.
sourcepub fn route_type(&self) -> i32
pub fn route_type(&self) -> i32
Returns the value of route_type
, or the default value if route_type
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 direction_id(&self) -> u32
pub fn direction_id(&self) -> u32
Returns the value of direction_id
, or the default value if direction_id
is unset.
Trait Implementations§
source§impl Clone for EntitySelector
impl Clone for EntitySelector
source§fn clone(&self) -> EntitySelector
fn clone(&self) -> EntitySelector
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for EntitySelector
impl Debug for EntitySelector
source§impl Default for EntitySelector
impl Default for EntitySelector
source§impl Message for EntitySelector
impl Message for EntitySelector
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 EntitySelector
impl PartialEq for EntitySelector
source§fn eq(&self, other: &EntitySelector) -> bool
fn eq(&self, other: &EntitySelector) -> bool
self
and other
values to be equal, and is used
by ==
.