[−][src]Enum google_maps::directions::request::traffic_model::TrafficModel
Specifies the traffic model to use when calculating time in traffic.
This setting affects the value returned in the duration_in_traffic
field
in the response, which contains the predicted time in traffic based on
historical averages. The traffic_model
parameter may only be specified for
driving directions where the request includes a departure_time
, and only
if the request includes an API key or a Google Maps Platform Premium Plan
client ID.
The default value of best_guess
will give the most useful predictions for
the vast majority of use cases. It is possible the best_guess
travel time
prediction may be shorter than optimistic
, or alternatively, longer
than pessimistic
, due to the way the best_guess
prediction model
integrates live traffic information.
Variants
Indicates that the returned duration_in_traffic
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.
Indicates that the returned duration_in_traffic 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.
Indicates that the returned duration_in_traffic
should be longer than
the actual travel time on most days, though occasional days with
particularly bad traffic conditions may exceed this value.
Trait Implementations
impl Clone for TrafficModel
[src]
fn clone(&self) -> TrafficModel
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for TrafficModel
[src]
impl Default for TrafficModel
[src]
impl<'de> Deserialize<'de> for TrafficModel
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Display for TrafficModel
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats a TrafficModel
enum into a string that is presentable to the
end user.
impl Eq for TrafficModel
[src]
impl<'_> From<&'_ TrafficModel> for String
[src]
fn from(traffic_model: &TrafficModel) -> String
[src]
Converts a TrafficModel
enum to a String
that contains a traffic
model
code.
impl Hash for TrafficModel
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for TrafficModel
[src]
fn cmp(&self, other: &TrafficModel) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<TrafficModel> for TrafficModel
[src]
fn eq(&self, other: &TrafficModel) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<TrafficModel> for TrafficModel
[src]
fn partial_cmp(&self, other: &TrafficModel) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for TrafficModel
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for TrafficModel
[src]
impl StructuralPartialEq for TrafficModel
[src]
impl TryFrom<String> for TrafficModel
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(traffic_model: String) -> Result<TrafficModel, Error>
[src]
Gets a TrafficModel
enum from a String
that contains a valid
traffic
model
code.
Auto Trait Implementations
impl RefUnwindSafe for TrafficModel
impl Send for TrafficModel
impl Sync for TrafficModel
impl Unpin for TrafficModel
impl UnwindSafe for TrafficModel
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,