Enum google_maps::directions::travel_mode::TravelMode [−][src]
pub enum TravelMode { Driving, Walking, Bicycling, Transit, }
Expand description
Specifies the mode of transportation.
When you calculate directions, you may specify the transportation mode
to
use. By default, directions are calculated as driving
directions.
Note: Both walking and bicycling directions may sometimes not include
clear pedestrian or bicycling paths, so these directions will return
warnings
in the returned result which you must display to the user.
Variants
(Default) Indicates standard driving directions using the road network.
Requests walking directions via pedestrian paths & sidewalks (where available).
Requests bicycling directions via bicycle paths & preferred streets (where available).
Requests directions via public transit routes (where available). If you
set the mode to transit
, you can optionally specify either a
departure_time
or an arrival_time
. If neither time is specified, the
departure_time
defaults to now (that is, the departure time defaults
to the current time). You can also optionally include a transit_mode
and/or a transit_routing_preference
.
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 TravelMode
enum to a String
that contains a travel
mode
code.
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
Gets a TravelMode
enum from a String
that contains a valid travel
mode
code.
Auto Trait Implementations
impl RefUnwindSafe for TravelMode
impl Send for TravelMode
impl Sync for TravelMode
impl Unpin for TravelMode
impl UnwindSafe for TravelMode
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
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more