Enum google_maps::directions::request::avoid::Avoid [−][src]
pub enum Avoid { Ferries, Highways, Indoor, Tolls, }
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
Indicates that the calculated route should avoid ferries.
Indicates that the calculated route should avoid highways.
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.
Indicates that the calculated route should avoid toll roads/bridges.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Converts an Avoid
enum to a String
that contains a
restrictions
code.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Avoid
impl UnwindSafe for Avoid
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V