Enum google_api_proto::google::maps::routes::v1::RoutingPreference
source · #[repr(i32)]pub enum RoutingPreference {
Unspecified = 0,
TrafficUnaware = 1,
TrafficAware = 2,
TrafficAwareOptimal = 3,
}
Expand description
A set of values that specify factors to take into consideration when calculating the route.
Variants§
Unspecified = 0
No routing preference specified. Default to TRAFFIC_AWARE
.
TrafficUnaware = 1
Computes routes without taking traffic conditions into consideration. Suitable when traffic conditions don’t matter. Using this value produces the lowest latency.
TrafficAware = 2
Calculates routes taking traffic conditions into consideration. In contrast
to TRAFFIC_AWARE_OPTIMAL
, some optimizations are applied to significantly
reduce latency.
TrafficAwareOptimal = 3
Calculates the routes taking traffic conditions into consideration, without applying most performance optimizations. Using this value produces the highest latency.
Implementations§
source§impl RoutingPreference
impl RoutingPreference
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Clone for RoutingPreference
impl Clone for RoutingPreference
source§fn clone(&self) -> RoutingPreference
fn clone(&self) -> RoutingPreference
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RoutingPreference
impl Debug for RoutingPreference
source§impl Default for RoutingPreference
impl Default for RoutingPreference
source§fn default() -> RoutingPreference
fn default() -> RoutingPreference
source§impl From<RoutingPreference> for i32
impl From<RoutingPreference> for i32
source§fn from(value: RoutingPreference) -> i32
fn from(value: RoutingPreference) -> i32
source§impl Hash for RoutingPreference
impl Hash for RoutingPreference
source§impl Ord for RoutingPreference
impl Ord for RoutingPreference
source§fn cmp(&self, other: &RoutingPreference) -> Ordering
fn cmp(&self, other: &RoutingPreference) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for RoutingPreference
impl PartialEq for RoutingPreference
source§fn eq(&self, other: &RoutingPreference) -> bool
fn eq(&self, other: &RoutingPreference) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for RoutingPreference
impl PartialOrd for RoutingPreference
source§fn partial_cmp(&self, other: &RoutingPreference) -> Option<Ordering>
fn partial_cmp(&self, other: &RoutingPreference) -> Option<Ordering>
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 moresource§impl TryFrom<i32> for RoutingPreference
impl TryFrom<i32> for RoutingPreference
§type Error = UnknownEnumValue
type Error = UnknownEnumValue
source§fn try_from(value: i32) -> Result<RoutingPreference, UnknownEnumValue>
fn try_from(value: i32) -> Result<RoutingPreference, UnknownEnumValue>
impl Copy for RoutingPreference
impl Eq for RoutingPreference
impl StructuralPartialEq for RoutingPreference
Auto Trait Implementations§
impl Freeze for RoutingPreference
impl RefUnwindSafe for RoutingPreference
impl Send for RoutingPreference
impl Sync for RoutingPreference
impl Unpin for RoutingPreference
impl UnwindSafe for RoutingPreference
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§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.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request