Enum google_maps::directions::request::departure_time::DepartureTime [−][src]
pub enum DepartureTime { Now, At(NaiveDateTime), }
Expand description
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).
At(NaiveDateTime)
Specifies the desired time of departure.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Converts a DepartureTime
enum to a String
that contains a departure
time.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
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
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V