#[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 live traffic conditions into consideration.
Suitable when traffic conditions don’t matter or are not applicable.
Using this value produces the lowest latency.
Note: For RouteTravelMode
DRIVE and TWO_WHEELER, the route and duration
chosen are based on road network and average time-independent traffic
conditions, not current road conditions. Consequently, routes may include
roads that are temporarily closed. Results for
a given request may vary over time due to changes
in the road network, updated average traffic conditions, and the
distributed nature of the service. Results may also vary between
nearly-equivalent routes at any time or frequency.
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§impl PartialOrd for RoutingPreference
impl PartialOrd for RoutingPreference
Source§impl TryFrom<i32> for RoutingPreference
impl TryFrom<i32> for RoutingPreference
Source§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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