[][src]Enum google_maps::directions::request::transit_mode::TransitMode

pub enum TransitMode {
    Bus,
    Rail,
    Subway,
    Train,
    Tram,
}

Specifies one or more preferred modes of transit.

This parameter may only be specified for transit directions, and only if the request includes an API key or a Google Maps Platform Premium Plan client ID.

Variants

Bus

Indicates that the calculated route should prefer travel by bus.

Rail

Indicates that the calculated route should prefer travel by train, tram, light rail, and subway. This is equivalent to transit_mode=train|tram|subway.

Subway

Indicates that the calculated route should prefer travel by subway.

Train

Indicates that the calculated route should prefer travel by train.

Tram

Indicates that the calculated route should prefer travel by tram and light rail. Indicates that the calculated route should prefer travel by tram and light rail.

Trait Implementations

impl Clone for TransitMode[src]

impl Debug for TransitMode[src]

impl Default for TransitMode[src]

fn default() -> Self[src]

Returns a reasonable default variant for the TransitMode enum type.

impl<'de> Deserialize<'de> for TransitMode[src]

impl Display for TransitMode[src]

fn fmt(&self, f: &mut Formatter) -> Result[src]

Formats a TransitMode enum into a string that is presentable to the end user.

impl Eq for TransitMode[src]

impl<'_> From<&'_ TransitMode> for String[src]

fn from(transit_mode: &TransitMode) -> String[src]

Converts a TransitMode enum to a String that contains a transit mode code.

impl Hash for TransitMode[src]

impl Ord for TransitMode[src]

impl PartialEq<TransitMode> for TransitMode[src]

impl PartialOrd<TransitMode> for TransitMode[src]

impl Serialize for TransitMode[src]

impl StructuralEq for TransitMode[src]

impl StructuralPartialEq for TransitMode[src]

impl TryFrom<String> for TransitMode[src]

type Error = Error

The type returned in the event of a conversion error.

fn try_from(transit_mode: String) -> Result<TransitMode, Error>[src]

Gets a TransitMode enum from a String that contains a valid transit mode code.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,