pub trait LineStringTrait: Sized + GeometryTrait {
type CoordType<'a>: 'a + CoordTrait<T = Self::T>
where Self: 'a;
// Required methods
fn num_coords(&self) -> usize;
unsafe fn coord_unchecked(&self, i: usize) -> Self::CoordType<'_>;
// Provided methods
fn coords(
&self,
) -> impl DoubleEndedIterator + ExactSizeIterator<Item = Self::CoordType<'_>> { ... }
fn coord(&self, i: usize) -> Option<Self::CoordType<'_>> { ... }
}
Expand description
A trait for accessing data from a generic LineString.
A LineString is an ordered collection of two or more points, representing a path between locations.
Refer to geo_types::LineString for information about semantics and validity.
Required Associated Types§
Sourcetype CoordType<'a>: 'a + CoordTrait<T = Self::T>
where
Self: 'a
type CoordType<'a>: 'a + CoordTrait<T = Self::T> where Self: 'a
The type of each underlying coordinate, which implements CoordTrait
Required Methods§
Sourcefn num_coords(&self) -> usize
fn num_coords(&self) -> usize
The number of coordinates in this LineString
Sourceunsafe fn coord_unchecked(&self, i: usize) -> Self::CoordType<'_>
unsafe fn coord_unchecked(&self, i: usize) -> Self::CoordType<'_>
Provided Methods§
Sourcefn coords(
&self,
) -> impl DoubleEndedIterator + ExactSizeIterator<Item = Self::CoordType<'_>>
fn coords( &self, ) -> impl DoubleEndedIterator + ExactSizeIterator<Item = Self::CoordType<'_>>
An iterator over the coordinates in this LineString
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.