Struct postgis_diesel::types::PointM
source · pub struct PointM {
pub x: f64,
pub y: f64,
pub m: f64,
pub srid: Option<u32>,
}
Expand description
Use that structure in Insertable
or Queryable
struct if you work with PointM geometry.
#[macro_use] extern crate diesel;
use postgis_diesel::types::PointM;
#[derive(Queryable)]
struct QueryablePointMExample {
id: i32,
point: PointM,
}
Fields§
§x: f64
§y: f64
§m: f64
§srid: Option<u32>
Implementations§
Trait Implementations§
source§impl<'expr> AsExpression<Geography> for &'expr PointM
impl<'expr> AsExpression<Geography> for &'expr PointM
§type Expression = Bound<Geography, &'expr PointM>
type Expression = Bound<Geography, &'expr PointM>
The expression being returned
source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
source§impl AsExpression<Geography> for PointM
impl AsExpression<Geography> for PointM
§type Expression = Bound<Geography, PointM>
type Expression = Bound<Geography, PointM>
The expression being returned
source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
source§impl<'expr> AsExpression<Geometry> for &'expr PointM
impl<'expr> AsExpression<Geometry> for &'expr PointM
§type Expression = Bound<Geometry, &'expr PointM>
type Expression = Bound<Geometry, &'expr PointM>
The expression being returned
source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
source§impl AsExpression<Geometry> for PointM
impl AsExpression<Geometry> for PointM
§type Expression = Bound<Geometry, PointM>
type Expression = Bound<Geometry, PointM>
The expression being returned
source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
source§impl<'expr> AsExpression<Nullable<Geography>> for &'expr PointM
impl<'expr> AsExpression<Nullable<Geography>> for &'expr PointM
§type Expression = Bound<Nullable<Geography>, &'expr PointM>
type Expression = Bound<Nullable<Geography>, &'expr PointM>
The expression being returned
source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
source§impl AsExpression<Nullable<Geography>> for PointM
impl AsExpression<Nullable<Geography>> for PointM
§type Expression = Bound<Nullable<Geography>, PointM>
type Expression = Bound<Nullable<Geography>, PointM>
The expression being returned
source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
source§impl<'expr> AsExpression<Nullable<Geometry>> for &'expr PointM
impl<'expr> AsExpression<Nullable<Geometry>> for &'expr PointM
§type Expression = Bound<Nullable<Geometry>, &'expr PointM>
type Expression = Bound<Nullable<Geometry>, &'expr PointM>
The expression being returned
source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
source§impl AsExpression<Nullable<Geometry>> for PointM
impl AsExpression<Nullable<Geometry>> for PointM
§type Expression = Bound<Nullable<Geometry>, PointM>
type Expression = Bound<Nullable<Geometry>, PointM>
The expression being returned
source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
source§impl<'de> Deserialize<'de> for PointM
impl<'de> Deserialize<'de> for PointM
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
source§impl PartialEq for PointM
impl PartialEq for PointM
source§impl PointT for PointM
impl PointT for PointM
fn get_x(&self) -> f64
fn get_y(&self) -> f64
fn get_srid(&self) -> Option<u32>
fn get_z(&self) -> Option<f64>
fn get_m(&self) -> Option<f64>
fn dimension(&self) -> u32
fn new_point( x: f64, y: f64, srid: Option<u32>, z: Option<f64>, m: Option<f64>, ) -> Result<Self, PointConstructorError>
impl Copy for PointM
impl StructuralPartialEq for PointM
Auto Trait Implementations§
impl Freeze for PointM
impl RefUnwindSafe for PointM
impl Send for PointM
impl Sync for PointM
impl Unpin for PointM
impl UnwindSafe for PointM
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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T, ST, DB> FromSqlRow<ST, DB> for Twhere
T: Queryable<ST, DB>,
ST: SqlTypeOrSelectable,
DB: Backend,
<T as Queryable<ST, DB>>::Row: FromStaticSqlRow<ST, DB>,
impl<T, ST, DB> FromSqlRow<ST, DB> for Twhere
T: Queryable<ST, DB>,
ST: SqlTypeOrSelectable,
DB: Backend,
<T as Queryable<ST, DB>>::Row: FromStaticSqlRow<ST, DB>,
source§impl<T, ST, DB> FromStaticSqlRow<ST, DB> for T
impl<T, ST, DB> FromStaticSqlRow<ST, DB> for T
source§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self
to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self
to an expression for Diesel’s query builder. Read moresource§impl<T, ST, DB> StaticallySizedRow<ST, DB> for T
impl<T, ST, DB> StaticallySizedRow<ST, DB> for T
source§const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE
const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE
The number of fields that this type will consume.