pub struct MultiLineString<T: WktNum = f64> { /* private fields */ }
Expand description
A parsed MultiLineString.
Implementations§
Source§impl<T: WktNum> MultiLineString<T>
impl<T: WktNum> MultiLineString<T>
Sourcepub fn new(line_strings: Vec<LineString<T>>, dim: Dimension) -> Self
pub fn new(line_strings: Vec<LineString<T>>, dim: Dimension) -> Self
Create a new LineString from a sequence of LineString and known Dimension.
Sourcepub fn from_line_strings(
line_strings: impl IntoIterator<Item = LineString<T>>,
) -> Option<Self>
pub fn from_line_strings( line_strings: impl IntoIterator<Item = LineString<T>>, ) -> Option<Self>
Create a new MultiLineString from a non-empty sequence of LineString.
This will infer the dimension from the first line string, and will not validate that all line strings have the same dimension.
Returns None
if the input iterator is empty.
To handle empty input iterators, consider calling unwrap_or
on the result and defaulting
to an empty geometry with specified dimension.
Sourcepub fn line_strings(&self) -> &[LineString<T>]
pub fn line_strings(&self) -> &[LineString<T>]
Access the inner line strings.
Sourcepub fn into_inner(self) -> (Vec<LineString<T>>, Dimension)
pub fn into_inner(self) -> (Vec<LineString<T>>, Dimension)
Consume self and return the inner parts.
Trait Implementations§
Source§impl<T: Clone + WktNum> Clone for MultiLineString<T>
impl<T: Clone + WktNum> Clone for MultiLineString<T>
Source§fn clone(&self) -> MultiLineString<T>
fn clone(&self) -> MultiLineString<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Default + WktNum> Default for MultiLineString<T>
impl<T: Default + WktNum> Default for MultiLineString<T>
Source§fn default() -> MultiLineString<T>
fn default() -> MultiLineString<T>
Returns the “default value” for a type. Read more
Source§impl<T> Display for MultiLineString<T>
impl<T> Display for MultiLineString<T>
Source§impl<'a, T> From<&'a MultiLineString<T>> for Geometry<T>where
T: CoordNum,
Available on crate feature geo-types
only.
impl<'a, T> From<&'a MultiLineString<T>> for Geometry<T>where
T: CoordNum,
Available on crate feature
geo-types
only.Source§fn from(multi_line_string: &'a MultiLineString<T>) -> Geometry<T>
fn from(multi_line_string: &'a MultiLineString<T>) -> Geometry<T>
Converts to this type from the input type.
Source§impl<T> From<MultiLineString<T>> for MultiLineString<T>where
T: CoordNum,
Available on crate feature geo-types
only.
impl<T> From<MultiLineString<T>> for MultiLineString<T>where
T: CoordNum,
Available on crate feature
geo-types
only.Source§fn from(multi_line_string: MultiLineString<T>) -> MultiLineString<T>
fn from(multi_line_string: MultiLineString<T>) -> MultiLineString<T>
Convert from a WKT MULTILINESTRING
to a geo_types::MultiLineString
Source§impl<T> From<MultiLineString<T>> for Wkt<T>where
T: WktNum,
impl<T> From<MultiLineString<T>> for Wkt<T>where
T: WktNum,
Source§fn from(value: MultiLineString<T>) -> Self
fn from(value: MultiLineString<T>) -> Self
Converts to this type from the input type.
Source§impl<'a, T: WktNum + 'a> GeometryTrait for &'a MultiLineString<T>
impl<'a, T: WktNum + 'a> GeometryTrait for &'a MultiLineString<T>
Source§type PointType<'b> = Point<<&'a MultiLineString<T> as GeometryTrait>::T>
where
Self: 'b
type PointType<'b> = Point<<&'a MultiLineString<T> as GeometryTrait>::T> where Self: 'b
The type of each underlying Point, which implements PointTrait
Source§type LineStringType<'b> = LineString<<&'a MultiLineString<T> as GeometryTrait>::T>
where
Self: 'b
type LineStringType<'b> = LineString<<&'a MultiLineString<T> as GeometryTrait>::T> where Self: 'b
The type of each underlying LineString, which implements LineStringTrait
Source§type PolygonType<'b> = Polygon<<&'a MultiLineString<T> as GeometryTrait>::T>
where
Self: 'b
type PolygonType<'b> = Polygon<<&'a MultiLineString<T> as GeometryTrait>::T> where Self: 'b
The type of each underlying Polygon, which implements PolygonTrait
Source§type MultiPointType<'b> = MultiPoint<<&'a MultiLineString<T> as GeometryTrait>::T>
where
Self: 'b
type MultiPointType<'b> = MultiPoint<<&'a MultiLineString<T> as GeometryTrait>::T> where Self: 'b
The type of each underlying MultiPoint, which implements MultiPointTrait
Source§type MultiLineStringType<'b> = MultiLineString<<&'a MultiLineString<T> as GeometryTrait>::T>
where
Self: 'b
type MultiLineStringType<'b> = MultiLineString<<&'a MultiLineString<T> as GeometryTrait>::T> where Self: 'b
The type of each underlying MultiLineString, which implements MultiLineStringTrait
Source§type MultiPolygonType<'b> = MultiPolygon<<&'a MultiLineString<T> as GeometryTrait>::T>
where
Self: 'b
type MultiPolygonType<'b> = MultiPolygon<<&'a MultiLineString<T> as GeometryTrait>::T> where Self: 'b
The type of each underlying MultiPolygon, which implements MultiPolygonTrait
Source§type GeometryCollectionType<'b> = GeometryCollection<<&'a MultiLineString<T> as GeometryTrait>::T>
where
Self: 'b
type GeometryCollectionType<'b> = GeometryCollection<<&'a MultiLineString<T> as GeometryTrait>::T> where Self: 'b
The type of each underlying GeometryCollection, which implements GeometryCollectionTrait
Source§type RectType<'b> = UnimplementedRect<T>
where
Self: 'b
type RectType<'b> = UnimplementedRect<T> where Self: 'b
The type of each underlying Rect, which implements RectTrait
Source§type LineType<'b> = UnimplementedLine<T>
where
Self: 'b
type LineType<'b> = UnimplementedLine<T> where Self: 'b
The type of each underlying Line, which implements LineTrait
Source§type TriangleType<'b> = UnimplementedTriangle<T>
where
Self: 'b
type TriangleType<'b> = UnimplementedTriangle<T> where Self: 'b
The type of each underlying Triangle, which implements TriangleTrait
Source§fn dim(&self) -> Dimensions
fn dim(&self) -> Dimensions
The dimension of this geometry
Source§fn as_type(
&self,
) -> GeometryType<'_, Point<T>, LineString<T>, Polygon<T>, MultiPoint<T>, MultiLineString<T>, MultiPolygon<T>, GeometryCollection<T>, Self::RectType<'_>, Self::TriangleType<'_>, Self::LineType<'_>>
fn as_type( &self, ) -> GeometryType<'_, Point<T>, LineString<T>, Polygon<T>, MultiPoint<T>, MultiLineString<T>, MultiPolygon<T>, GeometryCollection<T>, Self::RectType<'_>, Self::TriangleType<'_>, Self::LineType<'_>>
Cast this geometry to a
GeometryType
enum, which allows for downcasting to a specific
typeSource§impl<T: WktNum> GeometryTrait for MultiLineString<T>
impl<T: WktNum> GeometryTrait for MultiLineString<T>
Source§type PointType<'b> = Point<<MultiLineString<T> as GeometryTrait>::T>
where
Self: 'b
type PointType<'b> = Point<<MultiLineString<T> as GeometryTrait>::T> where Self: 'b
The type of each underlying Point, which implements PointTrait
Source§type LineStringType<'b> = LineString<<MultiLineString<T> as GeometryTrait>::T>
where
Self: 'b
type LineStringType<'b> = LineString<<MultiLineString<T> as GeometryTrait>::T> where Self: 'b
The type of each underlying LineString, which implements LineStringTrait
Source§type PolygonType<'b> = Polygon<<MultiLineString<T> as GeometryTrait>::T>
where
Self: 'b
type PolygonType<'b> = Polygon<<MultiLineString<T> as GeometryTrait>::T> where Self: 'b
The type of each underlying Polygon, which implements PolygonTrait
Source§type MultiPointType<'b> = MultiPoint<<MultiLineString<T> as GeometryTrait>::T>
where
Self: 'b
type MultiPointType<'b> = MultiPoint<<MultiLineString<T> as GeometryTrait>::T> where Self: 'b
The type of each underlying MultiPoint, which implements MultiPointTrait
Source§type MultiLineStringType<'b> = MultiLineString<<MultiLineString<T> as GeometryTrait>::T>
where
Self: 'b
type MultiLineStringType<'b> = MultiLineString<<MultiLineString<T> as GeometryTrait>::T> where Self: 'b
The type of each underlying MultiLineString, which implements MultiLineStringTrait
Source§type MultiPolygonType<'b> = MultiPolygon<<MultiLineString<T> as GeometryTrait>::T>
where
Self: 'b
type MultiPolygonType<'b> = MultiPolygon<<MultiLineString<T> as GeometryTrait>::T> where Self: 'b
The type of each underlying MultiPolygon, which implements MultiPolygonTrait
Source§type GeometryCollectionType<'b> = GeometryCollection<<MultiLineString<T> as GeometryTrait>::T>
where
Self: 'b
type GeometryCollectionType<'b> = GeometryCollection<<MultiLineString<T> as GeometryTrait>::T> where Self: 'b
The type of each underlying GeometryCollection, which implements GeometryCollectionTrait
Source§type RectType<'b> = UnimplementedRect<T>
where
Self: 'b
type RectType<'b> = UnimplementedRect<T> where Self: 'b
The type of each underlying Rect, which implements RectTrait
Source§type LineType<'b> = UnimplementedLine<T>
where
Self: 'b
type LineType<'b> = UnimplementedLine<T> where Self: 'b
The type of each underlying Line, which implements LineTrait
Source§type TriangleType<'b> = UnimplementedTriangle<T>
where
Self: 'b
type TriangleType<'b> = UnimplementedTriangle<T> where Self: 'b
The type of each underlying Triangle, which implements TriangleTrait
Source§fn dim(&self) -> Dimensions
fn dim(&self) -> Dimensions
The dimension of this geometry
Source§fn as_type(
&self,
) -> GeometryType<'_, Point<T>, LineString<T>, Polygon<T>, MultiPoint<T>, MultiLineString<T>, MultiPolygon<T>, GeometryCollection<T>, Self::RectType<'_>, Self::TriangleType<'_>, Self::LineType<'_>>
fn as_type( &self, ) -> GeometryType<'_, Point<T>, LineString<T>, Polygon<T>, MultiPoint<T>, MultiLineString<T>, MultiPolygon<T>, GeometryCollection<T>, Self::RectType<'_>, Self::TriangleType<'_>, Self::LineType<'_>>
Cast this geometry to a
GeometryType
enum, which allows for downcasting to a specific
typeSource§impl<T: WktNum> MultiLineStringTrait for &MultiLineString<T>
impl<T: WktNum> MultiLineStringTrait for &MultiLineString<T>
Source§type InnerLineStringType<'a> = &'a LineString<T>
where
Self: 'a
type InnerLineStringType<'a> = &'a LineString<T> where Self: 'a
The type of each underlying LineString, which implements LineStringTrait
Source§fn num_line_strings(&self) -> usize
fn num_line_strings(&self) -> usize
The number of line_strings in this MultiLineString
Source§unsafe 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 Read more
Source§fn line_strings(&self) -> impl DoubleEndedIterator + ExactSizeIterator
fn line_strings(&self) -> impl DoubleEndedIterator + ExactSizeIterator
An iterator over the LineStrings in this MultiLineString
Source§fn 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
Source§impl<T: WktNum> MultiLineStringTrait for MultiLineString<T>
impl<T: WktNum> MultiLineStringTrait for MultiLineString<T>
Source§type InnerLineStringType<'a> = &'a LineString<T>
where
Self: 'a
type InnerLineStringType<'a> = &'a LineString<T> where Self: 'a
The type of each underlying LineString, which implements LineStringTrait
Source§fn num_line_strings(&self) -> usize
fn num_line_strings(&self) -> usize
The number of line_strings in this MultiLineString
Source§unsafe 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 Read more
Source§fn line_strings(&self) -> impl DoubleEndedIterator + ExactSizeIterator
fn line_strings(&self) -> impl DoubleEndedIterator + ExactSizeIterator
An iterator over the LineStrings in this MultiLineString
Source§fn 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
impl<T: WktNum> StructuralPartialEq for MultiLineString<T>
Auto Trait Implementations§
impl<T> Freeze for MultiLineString<T>
impl<T> RefUnwindSafe for MultiLineString<T>where
T: RefUnwindSafe,
impl<T> Send for MultiLineString<T>where
T: Send,
impl<T> Sync for MultiLineString<T>where
T: Sync,
impl<T> Unpin for MultiLineString<T>where
T: Unpin,
impl<T> UnwindSafe for MultiLineString<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, G> ToGeoGeometry<T> for Gwhere
T: CoordNum,
G: GeometryTrait<T = T>,
impl<T, G> ToGeoGeometry<T> for Gwhere
T: CoordNum,
G: GeometryTrait<T = T>,
Source§impl<T, G> ToGeoMultiLineString<T> for Gwhere
T: CoordNum,
G: MultiLineStringTrait<T = T>,
impl<T, G> ToGeoMultiLineString<T> for Gwhere
T: CoordNum,
G: MultiLineStringTrait<T = T>,
Source§fn to_multi_line_string(&self) -> MultiLineString<T>
fn to_multi_line_string(&self) -> MultiLineString<T>
Convert to a geo_types
MultiLineString
.