pub trait MultiPointTrait: Sized + GeometryTrait {
type InnerPointType<'a>: 'a + PointTrait<T = Self::T>
where Self: 'a;
// Required methods
fn num_points(&self) -> usize;
unsafe fn point_unchecked(&self, i: usize) -> Self::InnerPointType<'_>;
// Provided methods
fn points(
&self,
) -> impl DoubleEndedIterator + ExactSizeIterator<Item = Self::InnerPointType<'_>> { ... }
fn point(&self, i: usize) -> Option<Self::InnerPointType<'_>> { ... }
}
Expand description
A trait for accessing data from a generic MultiPoint.
A MultiPoint is a collection of Point
s.
Refer to geo_types::MultiPoint for information about semantics and validity.
Required Associated Types§
Sourcetype InnerPointType<'a>: 'a + PointTrait<T = Self::T>
where
Self: 'a
type InnerPointType<'a>: 'a + PointTrait<T = Self::T> where Self: 'a
The type of each underlying Point, which implements PointTrait
Required Methods§
Sourcefn num_points(&self) -> usize
fn num_points(&self) -> usize
The number of points in this MultiPoint
Sourceunsafe fn point_unchecked(&self, i: usize) -> Self::InnerPointType<'_>
unsafe fn point_unchecked(&self, i: usize) -> Self::InnerPointType<'_>
Provided Methods§
Sourcefn points(
&self,
) -> impl DoubleEndedIterator + ExactSizeIterator<Item = Self::InnerPointType<'_>>
fn points( &self, ) -> impl DoubleEndedIterator + ExactSizeIterator<Item = Self::InnerPointType<'_>>
An iterator over the points in this MultiPoint
Sourcefn point(&self, i: usize) -> Option<Self::InnerPointType<'_>>
fn point(&self, i: usize) -> Option<Self::InnerPointType<'_>>
Access to a specified point in this MultiPoint Will return None if the provided index is out of bounds
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.