pub trait MultiLineStringTrait: Sized + GeometryTrait {
type InnerLineStringType<'a>: 'a + LineStringTrait<T = Self::T>
where Self: 'a;
// Required methods
fn num_line_strings(&self) -> usize;
unsafe fn line_string_unchecked(
&self,
i: usize,
) -> Self::InnerLineStringType<'_>;
// Provided methods
fn line_strings(
&self,
) -> impl DoubleEndedIterator + ExactSizeIterator<Item = Self::InnerLineStringType<'_>> { ... }
fn line_string(&self, i: usize) -> Option<Self::InnerLineStringType<'_>> { ... }
}Expand description
A trait for accessing data from a generic MultiLineString.
A MultiLineString is a collection of LineStrings.
Refer to geo_types::MultiLineString for information about semantics and validity.
Required Associated Types§
Sourcetype InnerLineStringType<'a>: 'a + LineStringTrait<T = Self::T>
where
Self: 'a
type InnerLineStringType<'a>: 'a + LineStringTrait<T = Self::T> where Self: 'a
The type of each underlying LineString, which implements LineStringTrait
Required Methods§
Sourcefn num_line_strings(&self) -> usize
fn num_line_strings(&self) -> usize
The number of line_strings in this MultiLineString
Sourceunsafe fn line_string_unchecked(
&self,
i: usize,
) -> Self::InnerLineStringType<'_>
unsafe fn line_string_unchecked( &self, i: usize, ) -> Self::InnerLineStringType<'_>
Access to a specified line_string in this MultiLineString
§Safety
Accessing an index out of bounds is UB.
Provided Methods§
Sourcefn line_strings(
&self,
) -> impl DoubleEndedIterator + ExactSizeIterator<Item = Self::InnerLineStringType<'_>>
fn line_strings( &self, ) -> impl DoubleEndedIterator + ExactSizeIterator<Item = Self::InnerLineStringType<'_>>
An iterator over the LineStrings in this MultiLineString
Sourcefn line_string(&self, i: usize) -> Option<Self::InnerLineStringType<'_>>
fn line_string(&self, i: usize) -> Option<Self::InnerLineStringType<'_>>
Access to a specified line_string in this MultiLineString 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.
Implementations on Foreign Types§
Source§impl<'a, T: CoordNum> MultiLineStringTrait for &'a MultiLineString<T>
Available on crate feature geo-types only.
impl<'a, T: CoordNum> MultiLineStringTrait for &'a MultiLineString<T>
Available on crate feature
geo-types only.type InnerLineStringType<'b> = &'a LineString<<&'a MultiLineString<T> as GeometryTrait>::T> where Self: 'b
fn num_line_strings(&self) -> usize
unsafe fn line_string_unchecked( &self, i: usize, ) -> Self::InnerLineStringType<'_>
Source§impl<T: CoordNum> MultiLineStringTrait for MultiLineString<T>
Available on crate feature geo-types only.
impl<T: CoordNum> MultiLineStringTrait for MultiLineString<T>
Available on crate feature
geo-types only.