#[repr(i32)]pub enum TrafficModel {
Unspecified = 0,
BestGuess = 1,
Pessimistic = 2,
Optimistic = 3,
}
Expand description
Specifies the assumptions to use when calculating time in traffic. This
setting affects the value returned in the duration
field in the
response, which contains the predicted time in traffic based on historical
averages.
Variants§
Unspecified = 0
Unused. If specified, will default to BEST_GUESS
.
BestGuess = 1
Indicates that the returned duration
should be the best
estimate of travel time given what is known about both historical traffic
conditions and live traffic. Live traffic becomes more important the closer
the departure_time
is to now.
Pessimistic = 2
Indicates that the returned duration should be longer than the actual travel time on most days, though occasional days with particularly bad traffic conditions may exceed this value.
Optimistic = 3
Indicates that the returned duration should be shorter than the actual travel time on most days, though occasional days with particularly good traffic conditions may be faster than this value.
Implementations§
Source§impl TrafficModel
impl TrafficModel
Source§impl TrafficModel
impl TrafficModel
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 TrafficModel
impl Clone for TrafficModel
Source§fn clone(&self) -> TrafficModel
fn clone(&self) -> TrafficModel
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for TrafficModel
impl Debug for TrafficModel
Source§impl Default for TrafficModel
impl Default for TrafficModel
Source§fn default() -> TrafficModel
fn default() -> TrafficModel
Source§impl From<TrafficModel> for i32
impl From<TrafficModel> for i32
Source§fn from(value: TrafficModel) -> i32
fn from(value: TrafficModel) -> i32
Source§impl Hash for TrafficModel
impl Hash for TrafficModel
Source§impl Ord for TrafficModel
impl Ord for TrafficModel
Source§fn cmp(&self, other: &TrafficModel) -> Ordering
fn cmp(&self, other: &TrafficModel) -> 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 TrafficModel
impl PartialEq for TrafficModel
Source§impl PartialOrd for TrafficModel
impl PartialOrd for TrafficModel
Source§impl TryFrom<i32> for TrafficModel
impl TryFrom<i32> for TrafficModel
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
Source§fn try_from(value: i32) -> Result<TrafficModel, UnknownEnumValue>
fn try_from(value: i32) -> Result<TrafficModel, UnknownEnumValue>
impl Copy for TrafficModel
impl Eq for TrafficModel
impl StructuralPartialEq for TrafficModel
Auto Trait Implementations§
impl Freeze for TrafficModel
impl RefUnwindSafe for TrafficModel
impl Send for TrafficModel
impl Sync for TrafficModel
impl Unpin for TrafficModel
impl UnwindSafe for TrafficModel
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