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<'de> Deserialize<'de> for EntitySelector
impl<'de> Deserialize<'de> for EntitySelector
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 Hash for EntitySelector
impl Hash 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(&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
.