logo
pub enum GeoPoint {
    Coordinates {
        latitude: f32,
        longitude: f32,
    },
    Geohash(String),
}
Expand description

Fields of type geo_point accept latitude-longitude pairs.

It can be used:

https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-point.html

Variants

Coordinates

Fields

latitude: f32

Latitudes measure an angle up from the equator (latitudes to the south are negative).

longitude: f32

A longitude is an angle from the prime meridian, measured to the east (longitudes to the west are negative)

Geo-point expressed as an array with the format: [lon, lat]

Geohash(String)

Geo-point expressed as a geohash

Implementations

Creates an instance of GeoPoint

Creates an instance of GeoPoint

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.