pub enum GeometryT<P: Point + EwkbRead> {
Point(P),
LineString(LineStringT<P>),
Polygon(PolygonT<P>),
MultiPoint(MultiPointT<P>),
MultiLineString(MultiLineStringT<P>),
MultiPolygon(MultiPolygonT<P>),
GeometryCollection(GeometryCollectionT<P>),
}Expand description
Generic Geometry Data Type
Variants§
Point(P)
LineString(LineStringT<P>)
Polygon(PolygonT<P>)
MultiPoint(MultiPointT<P>)
MultiLineString(MultiLineStringT<P>)
MultiPolygon(MultiPolygonT<P>)
GeometryCollection(GeometryCollectionT<P>)
Trait Implementations§
Source§impl<'a, P> AsEwkbGeometry<'a> for GeometryT<P>
impl<'a, P> AsEwkbGeometry<'a> for GeometryT<P>
type PointType = P
type PointIter = Iter<'a, P>
type MultiPointType = MultiPointT<P>
type LineType = LineStringT<P>
type LineIter = Iter<'a, <GeometryT<P> as AsEwkbGeometry<'a>>::LineType>
type MultiLineType = MultiLineStringT<P>
type PolyType = PolygonT<P>
type PolyIter = Iter<'a, <GeometryT<P> as AsEwkbGeometry<'a>>::PolyType>
type MultiPolyType = MultiPolygonT<P>
type GeomType = GeometryT<P>
type GeomIter = Iter<'a, <GeometryT<P> as AsEwkbGeometry<'a>>::GeomType>
type GeomCollection = GeometryCollectionT<P>
fn as_ewkb( &'a self, ) -> EwkbGeometry<'a, Self::PointType, Self::PointIter, Self::MultiPointType, Self::LineType, Self::LineIter, Self::MultiLineType, Self::PolyType, Self::PolyIter, Self::MultiPolyType, Self::GeomType, Self::GeomIter, Self::GeomCollection>
Source§impl<'a, P> FromSql<'a> for GeometryT<P>
impl<'a, P> FromSql<'a> for GeometryT<P>
Source§fn from_sql(ty: &Type, raw: &[u8]) -> Result<Self, Box<dyn Error + Sync + Send>>
fn from_sql(ty: &Type, raw: &[u8]) -> Result<Self, Box<dyn Error + Sync + Send>>
Creates a new value of this type from a buffer of data of the specified
Postgres
Type in its binary format. Read moreSource§fn accepts(ty: &Type) -> bool
fn accepts(ty: &Type) -> bool
Determines if a value of this type can be created from the specified
Postgres
Type.Source§impl ToSql for GeometryT<Point>
impl ToSql for GeometryT<Point>
Source§fn to_sql(
&self,
_: &Type,
out: &mut BytesMut,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn to_sql( &self, _: &Type, out: &mut BytesMut, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
Converts the value of
self into the binary format of the specified
Postgres Type, appending it to out. Read moreSource§fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn to_sql_checked( &self, ty: &Type, out: &mut BytesMut, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
An adaptor method used internally by Rust-Postgres. Read more
Source§fn accepts(ty: &Type) -> bool
fn accepts(ty: &Type) -> bool
Determines if a value of this type can be converted to the specified
Postgres
Type.Source§fn encode_format(&self, _ty: &Type) -> Format
fn encode_format(&self, _ty: &Type) -> Format
Specify the encode format
Source§impl ToSql for GeometryT<PointM>
impl ToSql for GeometryT<PointM>
Source§fn to_sql(
&self,
_: &Type,
out: &mut BytesMut,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn to_sql( &self, _: &Type, out: &mut BytesMut, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
Converts the value of
self into the binary format of the specified
Postgres Type, appending it to out. Read moreSource§fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn to_sql_checked( &self, ty: &Type, out: &mut BytesMut, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
An adaptor method used internally by Rust-Postgres. Read more
Source§fn accepts(ty: &Type) -> bool
fn accepts(ty: &Type) -> bool
Determines if a value of this type can be converted to the specified
Postgres
Type.Source§fn encode_format(&self, _ty: &Type) -> Format
fn encode_format(&self, _ty: &Type) -> Format
Specify the encode format
Source§impl ToSql for GeometryT<PointZ>
impl ToSql for GeometryT<PointZ>
Source§fn to_sql(
&self,
_: &Type,
out: &mut BytesMut,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn to_sql( &self, _: &Type, out: &mut BytesMut, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
Converts the value of
self into the binary format of the specified
Postgres Type, appending it to out. Read moreSource§fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn to_sql_checked( &self, ty: &Type, out: &mut BytesMut, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
An adaptor method used internally by Rust-Postgres. Read more
Source§fn accepts(ty: &Type) -> bool
fn accepts(ty: &Type) -> bool
Determines if a value of this type can be converted to the specified
Postgres
Type.Source§fn encode_format(&self, _ty: &Type) -> Format
fn encode_format(&self, _ty: &Type) -> Format
Specify the encode format
Source§impl ToSql for GeometryT<PointZM>
impl ToSql for GeometryT<PointZM>
Source§fn to_sql(
&self,
_: &Type,
out: &mut BytesMut,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn to_sql( &self, _: &Type, out: &mut BytesMut, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
Converts the value of
self into the binary format of the specified
Postgres Type, appending it to out. Read moreSource§fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn to_sql_checked( &self, ty: &Type, out: &mut BytesMut, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
An adaptor method used internally by Rust-Postgres. Read more
Source§fn accepts(ty: &Type) -> bool
fn accepts(ty: &Type) -> bool
Determines if a value of this type can be converted to the specified
Postgres
Type.Source§fn encode_format(&self, _ty: &Type) -> Format
fn encode_format(&self, _ty: &Type) -> Format
Specify the encode format
Auto Trait Implementations§
impl<P> Freeze for GeometryT<P>where
P: Freeze,
impl<P> RefUnwindSafe for GeometryT<P>where
P: RefUnwindSafe,
impl<P> Send for GeometryT<P>
impl<P> Sync for GeometryT<P>
impl<P> Unpin for GeometryT<P>where
P: Unpin,
impl<P> UnwindSafe for GeometryT<P>where
P: UnwindSafe,
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> BorrowToSql for Twhere
T: ToSql,
impl<T> BorrowToSql for Twhere
T: ToSql,
Source§fn borrow_to_sql(&self) -> &dyn ToSql
fn borrow_to_sql(&self) -> &dyn ToSql
Returns a reference to
self as a ToSql trait object.