Enum surrealdb_sql::Geometry
source · pub enum Geometry {
Point(Point<f64>),
Line(LineString<f64>),
Polygon(Polygon<f64>),
MultiPoint(MultiPoint<f64>),
MultiLine(MultiLineString<f64>),
MultiPolygon(MultiPolygon<f64>),
Collection(Vec<Geometry>),
}
Variants§
Point(Point<f64>)
Line(LineString<f64>)
Polygon(Polygon<f64>)
MultiPoint(MultiPoint<f64>)
MultiLine(MultiLineString<f64>)
MultiPolygon(MultiPolygon<f64>)
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<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 FromIterator<Geometry> for Geometry<f64>
impl FromIterator<Geometry> for Geometry<f64>
source§impl PartialEq for Geometry
impl PartialEq for Geometry
source§impl PartialOrd for Geometry
impl PartialOrd for Geometry
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Revisioned for Geometry
impl Revisioned for Geometry
impl StructuralPartialEq for Geometry
Auto Trait Implementations§
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