Enum google_maps::directions::request::unit_system::UnitSystem [−][src]
pub enum UnitSystem { Imperial, Metric, }
Expand description
Specifies the unit system to use when displaying results.
Directions results contain text
within distance
fields that may be
displayed to the user to indicate the distance of a particular “step” of the
route. By default, this text uses the unit system of the origin’s country or
region.
For example, a route from “Chicago, IL” to “Toronto, ONT” will display
results in miles, while the reverse route will display results in
kilometers. You may override this unit system by setting one explicitly
within the request’s units
parameter, passing one of the following values:
Note: this unit system setting only affects the text
displayed within
distance
fields. The distance
fields also contain values
which are
always expressed in meters.
Variants
Specifies that distances in the response should be expressed in imperial units, miles and feet.
Specifies that distances in the response should be expressed in metric units, using kilometres and metres.
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 UnitSystem
enum to a String
that contains a unit
system
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 UnitSystem
enum from a String
that contains a valid unit
system
code.
Auto Trait Implementations
impl RefUnwindSafe for UnitSystem
impl Send for UnitSystem
impl Sync for UnitSystem
impl Unpin for UnitSystem
impl UnwindSafe for UnitSystem
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