pub trait GeometryTrait {
type T;
type PointType<'a>: 'a + PointTrait<T = Self::T>
where Self: 'a;
type LineStringType<'a>: 'a + LineStringTrait<T = Self::T>
where Self: 'a;
type PolygonType<'a>: 'a + PolygonTrait<T = Self::T>
where Self: 'a;
type MultiPointType<'a>: 'a + MultiPointTrait<T = Self::T>
where Self: 'a;
type MultiLineStringType<'a>: 'a + MultiLineStringTrait<T = Self::T>
where Self: 'a;
type MultiPolygonType<'a>: 'a + MultiPolygonTrait<T = Self::T>
where Self: 'a;
type GeometryCollectionType<'a>: 'a + GeometryCollectionTrait<T = Self::T>
where Self: 'a;
type RectType<'a>: 'a + RectTrait<T = Self::T>
where Self: 'a;
type TriangleType<'a>: 'a + TriangleTrait<T = Self::T>
where Self: 'a;
type LineType<'a>: 'a + LineTrait<T = Self::T>
where Self: 'a;
// Required methods
fn dim(&self) -> Dimensions;
fn as_type(
&self,
) -> GeometryType<'_, Self::PointType<'_>, Self::LineStringType<'_>, Self::PolygonType<'_>, Self::MultiPointType<'_>, Self::MultiLineStringType<'_>, Self::MultiPolygonType<'_>, Self::GeometryCollectionType<'_>, Self::RectType<'_>, Self::TriangleType<'_>, Self::LineType<'_>>;
}
Expand description
A trait for accessing data from a generic Geometry.
Required Associated Types§
Sourcetype PointType<'a>: 'a + PointTrait<T = Self::T>
where
Self: 'a
type PointType<'a>: 'a + PointTrait<T = Self::T> where Self: 'a
The type of each underlying Point, which implements PointTrait
Sourcetype LineStringType<'a>: 'a + LineStringTrait<T = Self::T>
where
Self: 'a
type LineStringType<'a>: 'a + LineStringTrait<T = Self::T> where Self: 'a
The type of each underlying LineString, which implements LineStringTrait
Sourcetype PolygonType<'a>: 'a + PolygonTrait<T = Self::T>
where
Self: 'a
type PolygonType<'a>: 'a + PolygonTrait<T = Self::T> where Self: 'a
The type of each underlying Polygon, which implements PolygonTrait
Sourcetype MultiPointType<'a>: 'a + MultiPointTrait<T = Self::T>
where
Self: 'a
type MultiPointType<'a>: 'a + MultiPointTrait<T = Self::T> where Self: 'a
The type of each underlying MultiPoint, which implements MultiPointTrait
Sourcetype MultiLineStringType<'a>: 'a + MultiLineStringTrait<T = Self::T>
where
Self: 'a
type MultiLineStringType<'a>: 'a + MultiLineStringTrait<T = Self::T> where Self: 'a
The type of each underlying MultiLineString, which implements MultiLineStringTrait
Sourcetype MultiPolygonType<'a>: 'a + MultiPolygonTrait<T = Self::T>
where
Self: 'a
type MultiPolygonType<'a>: 'a + MultiPolygonTrait<T = Self::T> where Self: 'a
The type of each underlying MultiPolygon, which implements MultiPolygonTrait
Sourcetype GeometryCollectionType<'a>: 'a + GeometryCollectionTrait<T = Self::T>
where
Self: 'a
type GeometryCollectionType<'a>: 'a + GeometryCollectionTrait<T = Self::T> where Self: 'a
The type of each underlying GeometryCollection, which implements GeometryCollectionTrait
Sourcetype RectType<'a>: 'a + RectTrait<T = Self::T>
where
Self: 'a
type RectType<'a>: 'a + RectTrait<T = Self::T> where Self: 'a
The type of each underlying Rect, which implements RectTrait
Sourcetype TriangleType<'a>: 'a + TriangleTrait<T = Self::T>
where
Self: 'a
type TriangleType<'a>: 'a + TriangleTrait<T = Self::T> where Self: 'a
The type of each underlying Triangle, which implements TriangleTrait
Required Methods§
Sourcefn dim(&self) -> Dimensions
fn dim(&self) -> Dimensions
The dimension of this geometry
Sourcefn as_type(
&self,
) -> GeometryType<'_, Self::PointType<'_>, Self::LineStringType<'_>, Self::PolygonType<'_>, Self::MultiPointType<'_>, Self::MultiLineStringType<'_>, Self::MultiPolygonType<'_>, Self::GeometryCollectionType<'_>, Self::RectType<'_>, Self::TriangleType<'_>, Self::LineType<'_>>
fn as_type( &self, ) -> GeometryType<'_, Self::PointType<'_>, Self::LineStringType<'_>, Self::PolygonType<'_>, Self::MultiPointType<'_>, Self::MultiLineStringType<'_>, Self::MultiPolygonType<'_>, Self::GeometryCollectionType<'_>, Self::RectType<'_>, Self::TriangleType<'_>, Self::LineType<'_>>
Cast this geometry to a GeometryType
enum, which allows for downcasting to a specific
type
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.