[][src]Enum google_maps::TravelMode

pub enum TravelMode {
    Driving,
    Walking,
    Bicycling,
    Transit,
}

Specifies the mode of transportation.

When you calculate directions, you may specify the transportation mode to use. By default, directions are calculated as driving directions.

Note: Both walking and bicycling directions may sometimes not include clear pedestrian or bicycling paths, so these directions will return warnings in the returned result which you must display to the user.

Variants

Driving

(Default) Indicates standard driving directions using the road network.

Walking

Requests walking directions via pedestrian paths & sidewalks (where available).

Bicycling

Requests bicycling directions via bicycle paths & preferred streets (where available).

Transit

Requests directions via public transit routes (where available). If you set the mode to transit, you can optionally specify either a departure_time or an arrival_time. If neither time is specified, the departure_time defaults to now (that is, the departure time defaults to the current time). You can also optionally include a transit_mode and/or a transit_routing_preference.

Trait Implementations

impl Clone for TravelMode[src]

impl Debug for TravelMode[src]

impl Default for TravelMode[src]

fn default() -> Self[src]

Returns a reasonable default variant for the TravelMode enum type.

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

impl Display for TravelMode[src]

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

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

impl Eq for TravelMode[src]

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

fn from(travel_mode: &TravelMode) -> String[src]

Converts a TravelMode enum to a String that contains a travel mode code.

impl Hash for TravelMode[src]

impl Ord for TravelMode[src]

impl PartialEq<TravelMode> for TravelMode[src]

impl PartialOrd<TravelMode> for TravelMode[src]

impl Serialize for TravelMode[src]

impl StructuralEq for TravelMode[src]

impl StructuralPartialEq for TravelMode[src]

impl TryFrom<String> for TravelMode[src]

type Error = Error

The type returned in the event of a conversion error.

fn try_from(travel_mode: String) -> Result<TravelMode, Error>[src]

Gets a TravelMode enum from a String that contains a valid travel 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>,