Enum google_maps::directions::request::avoid::Avoid
source · #[repr(u8)]pub enum Avoid {
Ferries = 0,
Highways = 1,
Indoor = 2,
Tolls = 3,
}
Expand description
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 = 0
Indicates that the calculated route should avoid ferries.
Highways = 1
Indicates that the calculated route should avoid highways.
Indoor = 2
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 = 3
Indicates that the calculated route should avoid toll roads/bridges.
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Avoid
impl<'de> Deserialize<'de> for Avoid
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Manual implementation of Deserialize
for serde
. This will take
advantage of the phf
-powered TryFrom
implementation for this type.
source§impl From<&Avoid> for &str
impl From<&Avoid> for &str
source§fn from(avoid: &Avoid) -> Self
fn from(avoid: &Avoid) -> Self
Converts an Avoid
enum to a String
that contains a
restrictions
code.
source§impl From<&Avoid> for String
impl From<&Avoid> for String
source§fn from(avoid: &Avoid) -> Self
fn from(avoid: &Avoid) -> Self
Converts an Avoid
enum to a String
that contains a
restrictions
code.
source§impl Ord for Avoid
impl Ord for Avoid
source§impl PartialEq for Avoid
impl PartialEq for Avoid
source§impl PartialOrd for Avoid
impl PartialOrd for Avoid
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Avoid
impl StructuralPartialEq for Avoid
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.