[−][src]Enum google_maps::directions::request::departure_time::DepartureTime
Specifies the desired time of departure.
You can specify the time or alternatively you can specify a value of now, which sets the departure time to the current time (correct to the nearest second).
-
For requests where the travel mode is transit: You can optionally specify one of
departure_time
orarrival_time
. If neither time is specified, thedeparture_time
defaults to now (that is, the departure time defaults to the current time). -
For requests where the travel mode is driving: You can specify the
departure_time
to receive a route and trip duration (response field:duration_in_traffic
) that take traffic conditions into account. This option is only available if the request contains a valid API key, or a valid Google Maps Platform Premium Plan client ID and signature. Thedeparture_time
must be set to the current time or some time in the future. It cannot be in the past.
Note: If departure time is not specified, choice of route and duration are based on road network and average time-independent traffic conditions. 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.
Variants
You can specify a value of now, which sets the departure time to the current time (correct to the nearest second).
Specifies the desired time of departure.
Trait Implementations
impl Clone for DepartureTime
[src]
fn clone(&self) -> DepartureTime
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for DepartureTime
[src]
impl Default for DepartureTime
[src]
impl Display for DepartureTime
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats a DepartureTime
enum into a string that is presentable to the
end user.
impl Eq for DepartureTime
[src]
impl<'_> From<&'_ DepartureTime> for String
[src]
fn from(departure_time: &DepartureTime) -> String
[src]
Converts a DepartureTime
enum to a String
that contains a departure
time.
impl Hash for DepartureTime
[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 DepartureTime
[src]
fn cmp(&self, other: &DepartureTime) -> 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<DepartureTime> for DepartureTime
[src]
fn eq(&self, other: &DepartureTime) -> bool
[src]
fn ne(&self, other: &DepartureTime) -> bool
[src]
impl PartialOrd<DepartureTime> for DepartureTime
[src]
fn partial_cmp(&self, other: &DepartureTime) -> Option<Ordering>
[src]
fn lt(&self, other: &DepartureTime) -> bool
[src]
fn le(&self, other: &DepartureTime) -> bool
[src]
fn gt(&self, other: &DepartureTime) -> bool
[src]
fn ge(&self, other: &DepartureTime) -> bool
[src]
impl StructuralEq for DepartureTime
[src]
impl StructuralPartialEq for DepartureTime
[src]
Auto Trait Implementations
impl RefUnwindSafe for DepartureTime
impl Send for DepartureTime
impl Sync for DepartureTime
impl Unpin for DepartureTime
impl UnwindSafe for DepartureTime
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<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>,