[][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.

Transit Mode

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

Specifies bus as a preferred mode of transit.

Rail

Specifies rail as a preferred mode of transit.

Subway

Specifies subway as a preferred mode of transit.

Train

Specifies train as a preferred mode of transit.

Tram

Specifies tram as a preferred mode of transit.

Methods

impl TransitMode[src]

pub fn source_code_print(&self) -> String[src]

Converts a TransitMode enum to a String that contains a pretty source-code-style transit mode code for debugging.

Trait Implementations

impl Clone for TransitMode[src]

impl Debug 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 From<String> for TransitMode[src]

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

Gets a TransitMode enum from a String that contains a valid transit mode](https://developers.google.com/maps/documentation/javascript/reference/directions#TransitMode) 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> 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, 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.