[][src]Struct google_maps::LatLng

pub struct LatLng {
    pub lat: Decimal,
    pub lng: Decimal,
}

Latitude and longitude values must correspond to a valid location on the face of the earth. Latitudes can take any value between -90 and 90 while longitude values can take any value between -180 and 180. If you specify an invalid latitude or longitude value, your request will be rejected as a bad request.

Fields

lat: Decimal

Latitude. A value between -90.0° and 90.0°.

lng: Decimal

Longitude. A value between -180.0° and 180.0°.

Methods

impl LatLng[src]

pub fn try_from(latitude: Decimal, longitude: Decimal) -> Result<LatLng, Error>[src]

Takes individual latitude & longitude floating-point coordinates and converts them into a LatLng structure. If either the latitude (-90.0 to +90.0) or longitude (-180.0 to +180.0) are out of range, this function will return an error.

Trait Implementations

impl Clone for LatLng[src]

impl Debug for LatLng[src]

impl Default for LatLng[src]

fn default() -> Self[src]

Returns a reasonable default values for the LatLng struct.

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

impl Display for LatLng[src]

fn fmt(&self, f: &mut Formatter) -> Result[src]

Formats a LatLng struct into a string that is presentable to the end user.

impl Eq for LatLng[src]

impl<'_> From<&'_ LatLng> for String[src]

fn from(latlng: &LatLng) -> String[src]

Converts a LatLng struct to a String that contains a latitude/longitude pair.

impl Hash for LatLng[src]

impl Ord for LatLng[src]

impl PartialEq<LatLng> for LatLng[src]

impl PartialOrd<LatLng> for LatLng[src]

impl Serialize for LatLng[src]

impl StructuralEq for LatLng[src]

impl StructuralPartialEq for LatLng[src]

Auto Trait Implementations

impl RefUnwindSafe for LatLng

impl Send for LatLng

impl Sync for LatLng

impl Unpin for LatLng

impl UnwindSafe for LatLng

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: 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> ToString for T where
    T: Display + ?Sized
[src]

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>,