#[non_exhaustive]pub enum Geometry {
Point(Point),
Line(LineString),
Polygon(Polygon),
MultiPoint(MultiPoint),
MultiLine(MultiLineString),
MultiPolygon(MultiPolygon),
Collection(Vec<Geometry>),
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Point(Point)
Line(LineString)
Polygon(Polygon)
MultiPoint(MultiPoint)
MultiLine(MultiLineString)
MultiPolygon(MultiPolygon)
Collection(Vec<Geometry>)
Implementations§
Source§impl Geometry
impl Geometry
Sourcepub fn is_polygon(&self) -> bool
pub fn is_polygon(&self) -> bool
Check if this is a Polygon
Sourcepub fn is_multipoint(&self) -> bool
pub fn is_multipoint(&self) -> bool
Check if this is a MultiPoint
Sourcepub fn is_multiline(&self) -> bool
pub fn is_multiline(&self) -> bool
Check if this is a MultiLine
Sourcepub fn is_multipolygon(&self) -> bool
pub fn is_multipolygon(&self) -> bool
Check if this is a MultiPolygon
Sourcepub fn is_geometry(&self) -> bool
pub fn is_geometry(&self) -> bool
Check if this is not a Collection
Sourcepub fn is_collection(&self) -> bool
pub fn is_collection(&self) -> bool
Check if this is a Collection
Sourcepub fn as_coordinates(&self) -> Value
pub fn as_coordinates(&self) -> Value
Get the raw coordinates of this Geometry as an Array
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Geometry
impl<'de> Deserialize<'de> for Geometry
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Geometry, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Geometry, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<LineString> for Geometry
impl From<LineString> for Geometry
Source§fn from(v: LineString) -> Geometry
fn from(v: LineString) -> Geometry
Converts to this type from the input type.
Source§impl From<MultiLineString> for Geometry
impl From<MultiLineString> for Geometry
Source§fn from(v: MultiLineString) -> Geometry
fn from(v: MultiLineString) -> Geometry
Converts to this type from the input type.
Source§impl From<MultiPoint> for Geometry
impl From<MultiPoint> for Geometry
Source§fn from(v: MultiPoint) -> Geometry
fn from(v: MultiPoint) -> Geometry
Converts to this type from the input type.
Source§impl From<MultiPolygon> for Geometry
impl From<MultiPolygon> for Geometry
Source§fn from(v: MultiPolygon) -> Geometry
fn from(v: MultiPolygon) -> Geometry
Converts to this type from the input type.
Source§impl PartialOrd for Geometry
impl PartialOrd for Geometry
Source§impl Revisioned for Geometry
impl Revisioned for Geometry
Source§fn serialize_revisioned<W>(&self, writer: &mut W) -> Result<(), Error>where
W: Write,
fn serialize_revisioned<W>(&self, writer: &mut W) -> Result<(), Error>where
W: Write,
Serializes the struct using the specficifed writer
.
Source§impl Serialize for Geometry
impl Serialize for Geometry
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Geometry
Auto Trait Implementations§
impl Freeze for Geometry
impl RefUnwindSafe for Geometry
impl Send for Geometry
impl Sync for Geometry
impl Unpin for Geometry
impl UnwindSafe for Geometry
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