Struct google_maps::directions::response::transit_line::TransitLine
source · pub struct TransitLine {
pub name: Option<String>,
pub short_name: Option<String>,
pub color: Option<String>,
pub agencies: Vec<TransitAgency>,
pub url: Option<String>,
pub icon: Option<String>,
pub text_color: Option<String>,
pub vehicle: TransitVehicle,
}
Expand description
Contains the type of vehicle used on this line.
Fields§
§name: Option<String>
Contains the full name of this transit line. eg. “7 Avenue Express”
short_name: Option<String>
Contains the short name of this transit line. This will normally be a line number, such as “M7” or “355”.
color: Option<String>
Contains the color commonly used in signage for this transit line. The color will be specified as a hex string such as: #FF0033.
agencies: Vec<TransitAgency>
An array containing a single TransitAgency
object. The TransitAgency
object provides information about the operator of the line
url: Option<String>
Contains the URL for this transit line as provided by the transit agency.
icon: Option<String>
Contains the URL for the icon associated with this line.
text_color: Option<String>
Contains the color of text commonly used for signage of this line. The color will be specified as a hex string.
vehicle: TransitVehicle
Trait Implementations§
source§impl Clone for TransitLine
impl Clone for TransitLine
source§fn clone(&self) -> TransitLine
fn clone(&self) -> TransitLine
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TransitLine
impl Debug for TransitLine
source§impl<'de> Deserialize<'de> for TransitLine
impl<'de> Deserialize<'de> for TransitLine
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for TransitLine
impl Hash for TransitLine
source§impl Ord for TransitLine
impl Ord for TransitLine
source§fn cmp(&self, other: &TransitLine) -> Ordering
fn cmp(&self, other: &TransitLine) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for TransitLine
impl PartialEq for TransitLine
source§fn eq(&self, other: &TransitLine) -> bool
fn eq(&self, other: &TransitLine) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for TransitLine
impl PartialOrd for TransitLine
source§fn partial_cmp(&self, other: &TransitLine) -> Option<Ordering>
fn partial_cmp(&self, other: &TransitLine) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for TransitLine
impl Serialize for TransitLine
impl Eq for TransitLine
impl StructuralPartialEq for TransitLine
Auto Trait Implementations§
impl RefUnwindSafe for TransitLine
impl Send for TransitLine
impl Sync for TransitLine
impl Unpin for TransitLine
impl UnwindSafe for TransitLine
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.