pub struct Point {
pub longitude: f64,
pub latitude: f64,
pub srid: Option<i32>,
}Expand description
A geographic point (longitude, latitude).
Fields§
§longitude: f64Longitude (-180 to 180).
latitude: f64Latitude (-90 to 90).
srid: Option<i32>Optional SRID (spatial reference ID).
Implementations§
Source§impl Point
impl Point
Sourcepub fn to_postgis(&self) -> String
pub fn to_postgis(&self) -> String
Generate PostGIS point.
Sourcepub fn to_geojson(&self) -> Value
pub fn to_geojson(&self) -> Value
Generate GeoJSON.
Sourcepub fn to_sql(&self, db_type: DatabaseType) -> String
pub fn to_sql(&self, db_type: DatabaseType) -> String
Generate SQL for database type.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Point
impl<'de> Deserialize<'de> for Point
Source§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
impl Copy for Point
impl StructuralPartialEq for Point
Auto Trait Implementations§
impl Freeze for Point
impl RefUnwindSafe for Point
impl Send for Point
impl Sync for Point
impl Unpin for Point
impl UnwindSafe for Point
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more