#[non_exhaustive]pub struct RouteModifiers {
pub avoid_tolls: bool,
pub avoid_highways: bool,
pub avoid_ferries: bool,
pub avoid_indoor: bool,
/* private fields */
}Expand description
Encapsulates a set of optional conditions to satisfy when calculating
vehicle routes. This is similar to RouteModifiers in the Google Maps
Platform API; see:
https://developers.google.com/maps/documentation/routes/reference/rest/v2/RouteModifiers.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.avoid_tolls: boolSpecifies whether to avoid toll roads where reasonable. Preference will be given to routes not containing toll roads. Applies only to motorized travel modes.
avoid_highways: boolSpecifies whether to avoid highways where reasonable. Preference will be given to routes not containing highways. Applies only to motorized travel modes.
avoid_ferries: boolSpecifies whether to avoid ferries where reasonable. Preference will be given to routes not containing travel by ferries. Applies only to motorized travel modes.
avoid_indoor: boolOptional. Specifies whether to avoid navigating indoors where reasonable.
Preference will be given to routes not containing indoor navigation.
Applies only to the WALKING travel mode.
Implementations§
Source§impl RouteModifiers
impl RouteModifiers
pub fn new() -> Self
Sourcepub fn set_avoid_tolls<T: Into<bool>>(self, v: T) -> Self
pub fn set_avoid_tolls<T: Into<bool>>(self, v: T) -> Self
Sets the value of avoid_tolls.
Sourcepub fn set_avoid_highways<T: Into<bool>>(self, v: T) -> Self
pub fn set_avoid_highways<T: Into<bool>>(self, v: T) -> Self
Sets the value of avoid_highways.
Sourcepub fn set_avoid_ferries<T: Into<bool>>(self, v: T) -> Self
pub fn set_avoid_ferries<T: Into<bool>>(self, v: T) -> Self
Sets the value of avoid_ferries.
Sourcepub fn set_avoid_indoor<T: Into<bool>>(self, v: T) -> Self
pub fn set_avoid_indoor<T: Into<bool>>(self, v: T) -> Self
Sets the value of avoid_indoor.
Trait Implementations§
Source§impl Clone for RouteModifiers
impl Clone for RouteModifiers
Source§fn clone(&self) -> RouteModifiers
fn clone(&self) -> RouteModifiers
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more