[][src]Enum google_maps::directions::request::avoid::Avoid

pub enum Avoid {
    Tolls,
    Highways,
    Ferries,
    Indoor,
}

Used to specify features that calculated routes should avoid.

Restrictions

Directions may be calculated that adhere to certain restrictions. Restrictions are indicated by use of the avoid parameter, and an argument to that parameter indicating the restriction to avoid. The following restrictions are supported:

  • Tolls
  • Highways
  • Ferries

It's possible to request a route that avoids any combination of tolls, highways and ferries by passing both restrictions to the avoid parameter. For example: avoid=tolls|highways|ferries.

Note: the addition of restrictions does not preclude routes that include the restricted feature; it simply biases the result to more favorable routes.

Variants

Tolls

Instructs the Directions service to avoid toll roads where possible.

Highways

Instructs the Directions service to avoid highways where possible.

Ferries

Instructs the Directions service to avoid ferries where possible.

Indoor

Instructs the Directions service to avoid indoor steps for walking and transit directions. Only requests that include an API key or a Google Maps Platform Premium Plan client ID will receive indoor steps by default.

Methods

impl Avoid[src]

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

Converts an Avoid enum to a String that contains a pretty source-code-style restrictions code for debugging.

Trait Implementations

impl Clone for Avoid[src]

impl Debug for Avoid[src]

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

fn from(avoid: &Avoid) -> String[src]

Converts an Avoid enum to a String that contains a restrictions code.

impl From<String> for Avoid[src]

fn from(avoid: String) -> Avoid[src]

Gets an Avoid enum from a String that contains a valid restrictions code.

Auto Trait Implementations

impl RefUnwindSafe for Avoid

impl Send for Avoid

impl Sync for Avoid

impl Unpin for Avoid

impl UnwindSafe for Avoid

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.