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

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

Used to specify features that calculated routes should avoid.

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

Ferries

Indicates that the calculated route should avoid ferries.

Highways

Indicates that the calculated route should avoid highways.

Indoor

Indicates that the calculated route should 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.

Tolls

Indicates that the calculated route should avoid toll roads/bridges.

Trait Implementations

impl Clone for Avoid[src]

impl Debug for Avoid[src]

impl Default for Avoid[src]

fn default() -> Self[src]

Returns a reasonable default variant for the Avoid enum type.

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

impl Display for Avoid[src]

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

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

impl Eq 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 Hash for Avoid[src]

impl Ord for Avoid[src]

impl PartialEq<Avoid> for Avoid[src]

impl PartialOrd<Avoid> for Avoid[src]

impl Serialize for Avoid[src]

impl StructuralEq for Avoid[src]

impl StructuralPartialEq for Avoid[src]

impl<'_> TryFrom<&'_ str> for Avoid[src]

type Error = Error

The type returned in the event of a conversion error.

fn try_from(avoid: &str) -> Result<Avoid, Error>[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> 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>,