Struct geo_types::geometry::MultiPoint
source · pub struct MultiPoint<T: CoordNum = f64>(pub Vec<Point<T>>);
Expand description
A collection of Point
s. Can
be created from a Vec
of Point
s, or from an
Iterator which yields Point
s. Iterating over this
object yields the component Point
s.
§Semantics
The interior and the boundary are the union of the
interior and the boundary of the constituent points. In
particular, the boundary of a MultiPoint
is always
empty.
§Examples
Iterating over a MultiPoint
yields the Point
s inside.
use geo_types::{MultiPoint, Point};
let points: MultiPoint<_> = vec![(0., 0.), (1., 2.)].into();
for point in points {
println!("Point x = {}, y = {}", point.x(), point.y());
}
Tuple Fields§
§0: Vec<Point<T>>
Implementations§
Trait Implementations§
source§impl<T: Clone + CoordNum> Clone for MultiPoint<T>
impl<T: Clone + CoordNum> Clone for MultiPoint<T>
source§fn clone(&self) -> MultiPoint<T>
fn clone(&self) -> MultiPoint<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: CoordNum> From<MultiPoint<T>> for Geometry<T>
impl<T: CoordNum> From<MultiPoint<T>> for Geometry<T>
source§fn from(x: MultiPoint<T>) -> Self
fn from(x: MultiPoint<T>) -> Self
Converts to this type from the input type.
source§impl<T: CoordNum, IP: Into<Point<T>>> FromIterator<IP> for MultiPoint<T>
impl<T: CoordNum, IP: Into<Point<T>>> FromIterator<IP> for MultiPoint<T>
source§fn from_iter<I: IntoIterator<Item = IP>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = IP>>(iter: I) -> Self
Collect the results of a Point
iterator into a MultiPoint
source§impl<'a, T: CoordNum> IntoIterator for &'a MultiPoint<T>
impl<'a, T: CoordNum> IntoIterator for &'a MultiPoint<T>
source§impl<'a, T: CoordNum> IntoIterator for &'a mut MultiPoint<T>
impl<'a, T: CoordNum> IntoIterator for &'a mut MultiPoint<T>
source§impl<T: CoordNum> IntoIterator for MultiPoint<T>
impl<T: CoordNum> IntoIterator for MultiPoint<T>
Iterate over the Point
s in this MultiPoint
.
source§impl<T: PartialEq + CoordNum> PartialEq for MultiPoint<T>
impl<T: PartialEq + CoordNum> PartialEq for MultiPoint<T>
source§fn eq(&self, other: &MultiPoint<T>) -> bool
fn eq(&self, other: &MultiPoint<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T: CoordNum> TryFrom<Geometry<T>> for MultiPoint<T>
impl<T: CoordNum> TryFrom<Geometry<T>> for MultiPoint<T>
Convert a Geometry enum into its inner type.
Fails if the enum case does not match the type you are trying to convert it to.
impl<T: Eq + CoordNum> Eq for MultiPoint<T>
impl<T: CoordNum> StructuralPartialEq for MultiPoint<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for MultiPoint<T>where
T: RefUnwindSafe,
impl<T> Send for MultiPoint<T>where
T: Send,
impl<T> Sync for MultiPoint<T>where
T: Sync,
impl<T> Unpin for MultiPoint<T>where
T: Unpin,
impl<T> UnwindSafe for MultiPoint<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