[][src]Struct google_maps::geocoding::response::geometry::Geometry

pub struct Geometry {
    pub location: LatLng,
    pub location_type: LocationType,
    pub viewport: Bounds,
    pub bounds: Option<Bounds>,
}

Contains the geocoded latitude/longitude, recommended viewport for displaying the returned result, the bounding box, and other additional data.

Fields

location: LatLng

Contains the geocoded latitude, longitude value. For normal address lookups, this field is typically the most important.

location_type: LocationType

Stores additional data about the specified location.

viewport: Bounds

Contains the recommended viewport for displaying the returned result, specified as two latitude/longitude values defining the southwest and northeast corner of the viewport bounding box. Generally the viewport is used to frame a result when displaying it to a user.

bounds: Option<Bounds>

Stores the bounding box which can fully contain the returned result. Note that these bounds may not match the recommended viewport. (For example, San Francisco includes the Farallon islands, which are technically part of the city, but probably should not be returned in the viewport.)

Implementations

impl Geometry[src]

pub fn get_bounds_southwest_lat(&self) -> Option<Decimal>[src]

A helper function for destructuring the optional bounds field. If the bounds field is populated, this function will return the south-west latitude. If the bounds field is empty, this function will return None.

let bounds_southwest_lat = geocoding.geometry.get_bounds_southwest_lng();

pub fn get_bounds_southwest_lng(&self) -> Option<Decimal>[src]

A helper function for destructuring the optional bounds field. If the bounds field is populated, this function will return the south-west latitude. If the bounds field is empty, this function will return None.

let bounds_southwest_lng = geocoding.geometry.get_bounds_southwest_lng();

pub fn get_bounds_northeast_lat(&self) -> Option<Decimal>[src]

A helper function for destructuring the optional bounds field. If the bounds field is populated, this function will return the north-east latitude. If the bounds field is empty, this function will return None.

let bounds_northeast_lat = geocoding.geometry.get_bounds_northeast_lng();

pub fn get_bounds_northeast_lng(&self) -> Option<Decimal>[src]

A helper function for destructuring the optional bounds field. If the bounds field is populated, this function will return the north-east latitude. If the bounds field is empty, this function will return None.

let bounds_northeast_lng = geocoding.geometry.get_bounds_northeast_lng();

Trait Implementations

impl Clone for Geometry[src]

impl Debug for Geometry[src]

impl<'de> Deserialize<'de> for Geometry[src]

impl Eq for Geometry[src]

impl Hash for Geometry[src]

impl Ord for Geometry[src]

impl PartialEq<Geometry> for Geometry[src]

impl PartialOrd<Geometry> for Geometry[src]

impl Serialize for Geometry[src]

impl StructuralEq for Geometry[src]

impl StructuralPartialEq for Geometry[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,