#[repr(transparent)]pub struct MultiPolygon<Pg: PolygonTrait>(pub Vec<Pg>);Expand description
Default MultiPolygon — a Vec<Pg> newtype where Pg is any
concrete PolygonTrait implementor.
Mirrors boost::geometry::model::multi_polygon<Polygon> from
boost/geometry/geometries/multi_polygon.hpp:48-92. The
#[repr(transparent)] annotation guarantees the in-memory layout
matches the underlying Vec<Pg>, mirroring the invariant Boost
relies on by inheriting publicly from std::vector<Polygon>
(boost/geometry/geometries/multi_polygon.hpp:55).
Tuple Fields§
§0: Vec<Pg>Implementations§
Source§impl<Pg: PolygonTrait> MultiPolygon<Pg>
impl<Pg: PolygonTrait> MultiPolygon<Pg>
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Construct an empty multi-polygon.
Mirrors the default multi_polygon() constructor at
boost/geometry/geometries/multi_polygon.hpp:63-65.
Trait Implementations§
Source§impl<Pg: Clone + PolygonTrait> Clone for MultiPolygon<Pg>
impl<Pg: Clone + PolygonTrait> Clone for MultiPolygon<Pg>
Source§fn clone(&self) -> MultiPolygon<Pg>
fn clone(&self) -> MultiPolygon<Pg>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<Pg: Debug + PolygonTrait> Debug for MultiPolygon<Pg>
impl<Pg: Debug + PolygonTrait> Debug for MultiPolygon<Pg>
Source§impl<Pg: PolygonTrait> Default for MultiPolygon<Pg>
impl<Pg: PolygonTrait> Default for MultiPolygon<Pg>
Source§impl<Pg: PolygonTrait> Geometry for MultiPolygon<Pg>
Tag this concrete type as a MultiPolygon. Mirrors the
traits::tag<model::multi_polygon<...>> specialisation at
boost/geometry/geometries/multi_polygon.hpp:100-115.
impl<Pg: PolygonTrait> Geometry for MultiPolygon<Pg>
Tag this concrete type as a MultiPolygon. Mirrors the
traits::tag<model::multi_polygon<...>> specialisation at
boost/geometry/geometries/multi_polygon.hpp:100-115.
Source§impl<Pg: PolygonTrait> MultiPolygon for MultiPolygon<Pg>
Wire the MultiPolygon concept up. The polygons() iterator hands
back self.0.iter() — slice::Iter is already
ExactSizeIterator. Plays the role of boost::begin(mpg) /
boost::end(mpg) on model::multi_polygon
(boost/geometry/geometries/multi_polygon.hpp:55-59).
impl<Pg: PolygonTrait> MultiPolygon for MultiPolygon<Pg>
Wire the MultiPolygon concept up. The polygons() iterator hands
back self.0.iter() — slice::Iter is already
ExactSizeIterator. Plays the role of boost::begin(mpg) /
boost::end(mpg) on model::multi_polygon
(boost/geometry/geometries/multi_polygon.hpp:55-59).