Struct diesel_mysql_spatial::data_types::Point
source · [−]Expand description
A single point in 2D space.
MySQL extension: The spatial reference system identifier (SRID) may identify the used coordinate system.
Fields
srid: SRIDgeom: Point<f64>Methods from Deref<Target = Point<f64>>
sourcepub fn set_x(&mut self, x: T) -> &mut Point<T>
pub fn set_x(&mut self, x: T) -> &mut Point<T>
Sets the x/horizontal component of the point.
Examples
use geo_types::Point;
let mut p = Point::new(1.234, 2.345);
p.set_x(9.876);
assert_eq!(p.x(), 9.876);sourcepub fn set_y(&mut self, y: T) -> &mut Point<T>
pub fn set_y(&mut self, y: T) -> &mut Point<T>
Sets the y/vertical component of the point.
Examples
use geo_types::Point;
let mut p = Point::new(1.234, 2.345);
p.set_y(9.876);
assert_eq!(p.y(), 9.876);sourcepub fn set_lng(&mut self, lng: T) -> &mut Point<T>
👎 Deprecated: use Point::set_x instead, it’s less ambiguous
pub fn set_lng(&mut self, lng: T) -> &mut Point<T>
use Point::set_x instead, it’s less ambiguous
Sets the longitude/horizontal component of the point.
Examples
use geo_types::Point;
let mut p = Point::new(1.234, 2.345);
#[allow(deprecated)]
p.set_lng(9.876);
assert_eq!(p.x(), 9.876);sourcepub fn set_lat(&mut self, lat: T) -> &mut Point<T>
👎 Deprecated: use Point::set_y instead, it’s less ambiguous
pub fn set_lat(&mut self, lat: T) -> &mut Point<T>
use Point::set_y instead, it’s less ambiguous
Sets the latitude/vertical component of the point.
Examples
use geo_types::Point;
let mut p = Point::new(1.234, 2.345);
#[allow(deprecated)]
p.set_lat(9.876);
assert_eq!(p.y(), 9.876);Trait Implementations
sourceimpl<__ST, __DB> FromSqlRow<__ST, __DB> for Point where
__DB: Backend,
Self: FromSql<__ST, __DB>,
impl<__ST, __DB> FromSqlRow<__ST, __DB> for Point where
__DB: Backend,
Self: FromSql<__ST, __DB>,
sourcefn build_from_row<R: Row<__DB>>(row: &mut R) -> Result<Self>
fn build_from_row<R: Row<__DB>>(row: &mut R) -> Result<Self>
See the trait documentation.
sourceconst FIELDS_NEEDED: usize = 1usize
const FIELDS_NEEDED: usize = 1usize
The number of fields that this type will consume. Must be equal to
the number of times you would call row.take() in build_from_row Read more
sourceimpl<__ST, __DB> Queryable<__ST, __DB> for Point where
__DB: Backend,
Self: FromSql<__ST, __DB>,
impl<__ST, __DB> Queryable<__ST, __DB> for Point where
__DB: Backend,
Self: FromSql<__ST, __DB>,
impl StructuralPartialEq for Point
Auto Trait Implementations
impl RefUnwindSafe for Point
impl Send for Point
impl Sync for Point
impl Unpin for Point
impl UnwindSafe for Point
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> IntoSql for T
impl<T> IntoSql for T
sourcefn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
Convert self to an expression for Diesel’s query builder. Read more
sourcefn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
Convert &self to an expression for Diesel’s query builder. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more